Hello,
I have a TextBox1 binds to dateEnterred as datetime. My system date format
is m/d/yy. When I gave the value as string, "04/18/2008" to the
TextBox1.Text, it changed to "41/8/08".
Without changing the Date Format on the system and maintaining the datetime
datatype for dateEntered, how can I make the TextBox1.Text to bind value
"04/18/2008" instead of "41/8/08".
Thank you,
Phien-An 5 1030
try the .ToString method of datetime type:
datetime.ToString(format as string)
in case, datetime.ToString("MM/dd/YYYY")
Thiago
On 16 abr, 16:03, Thiago Macedo <thiago.ch...@gmail.comwrote:
try the .ToString method of datetime type:
datetime.ToString(format as string)
in case, datetime.ToString("MM/dd/YYYY")
Thiago
I think this article will help you: http://www.codeproject.com/KB/cs/String2DateTime.aspx
On Apr 16, 8:41 pm, "Phien-An Nguyen" <onok...@gmail.comwrote:
Hello,
I have a TextBox1 binds to dateEnterred as datetime. My system date format
is m/d/yy. When I gave the value as string, "04/18/2008" to the
TextBox1.Text, it changed to "41/8/08".
Without changing the Date Format on the system and maintaining the datetime
datatype for dateEntered, how can I make the TextBox1.Text to bind value
"04/18/2008" instead of "41/8/08".
Thank you,
Phien-An
Hi,
DateString can provide you date omitted with hyphens "-", then you can
easily replace hyphens to slashes that matches your visiual desire.
So, place textbox named "textbox1" then here is your solution:
TextBox1.Text = DateString.ToString
TextBox1.Text = TextBox1.Text.Replace("-", "/")
Hope this helps,
Onur Güzel
Don't forget that there is a difference between lowercase m and uppercase M
on the date/time format. Looks like you had it using Minutes instead of
Months.
"Phien-An Nguyen" <on*****@gmail.comwrote in message
news:eI****************@TK2MSFTNGP03.phx.gbl...
Hello,
I have a TextBox1 binds to dateEnterred as datetime. My system date
format is m/d/yy. When I gave the value as string, "04/18/2008" to the
TextBox1.Text, it changed to "41/8/08".
Without changing the Date Format on the system and maintaining the
datetime datatype for dateEntered, how can I make the TextBox1.Text to
bind value "04/18/2008" instead of "41/8/08".
Thank you,
Phien-An
Mark,
In my idea you hit this one,
Cor
"Mark" <tr**********@fuse.netschreef in bericht
news:eT****************@TK2MSFTNGP02.phx.gbl...
Don't forget that there is a difference between lowercase m and uppercase
M on the date/time format. Looks like you had it using Minutes instead of
Months.
"Phien-An Nguyen" <on*****@gmail.comwrote in message
news:eI****************@TK2MSFTNGP03.phx.gbl...
>Hello,
I have a TextBox1 binds to dateEnterred as datetime. My system date format is m/d/yy. When I gave the value as string, "04/18/2008" to the TextBox1.Text, it changed to "41/8/08".
Without changing the Date Format on the system and maintaining the datetime datatype for dateEntered, how can I make the TextBox1.Text to bind value "04/18/2008" instead of "41/8/08".
Thank you,
Phien-An
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike Button |
last post by:
Hello all,
I am really really desperate on what I should do, and I am asking for help
from anyone in this newsgroup, here's the situation:
I am creating a form that is being run on a server...
|
by: Alicia |
last post by:
Hi, I am trying to match two queries and make it into one query. I
have only been about to group similar attributes but nothing that
looks like the FinalQuery below. If anyone knows of a query...
|
by: Alicia |
last post by:
Hello everyone based on the data, I created a union query which
produces this.
SELECT ,,, 0 As ClosedCount
FROM
UNION SELECT
,, 0 AS OpenedCount,
FROM
ORDER BY , ;
|
by: Anon |
last post by:
Hello All!
I have written a simple app that auto downloads a file from a secure
ftp, renames it, and moves it to a network location. Everything works
great except the renaming part. I parse out...
|
by: georges the man |
last post by:
hey guys,
i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this.
i have to write the following code. this will be the last...
| |
by: Bill |
last post by:
I have a 200 record database that includes a date/time field,
AnnivDate, for a wedding anniversary. AnnivDate has nulls and some
incorrect year data. I have been creating the Access database...
|
by: pic078 via AccessMonster.com |
last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files)
that remains stuck in task manager after exiting the application - you can't
reopen database after exiting as a result...
|
by: sorobor |
last post by:
dear sir ..
i am using cakephp freamwork ..By the way i m begener in php and javascript ..
My probs r bellow
I made a javascript calender ..there is a close button ..when i press close button...
|
by: xstatic |
last post by:
After searching through the hundreds of links about "Javascript Date Formatting", all I am finding is how to format dates that gives a "current date" result.
Here is what I need...
I have a...
|
by: matrekz42 |
last post by:
Hello friends,
I'm trying to run this Dynamic SQL in VB, but I keep getting "Compile Error" Syntax Error, in the "Bolded" area. I'm only trying to change these fields for the second query listed,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |