|
-
Nov 9th, 2006, 05:42 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] format date
Hi,
I need to convert a date as follows please.
strPayDate = "31/01/2006";
DateTime dtPayDate = DateTime.Parse(strPayDate.ToString()); //returns "01/31/2006"
I would like to get dtPayDate which is of type DateTime:
dtPayDate = "31/01/2006"
p.s. i tried using ToShortDateString but this seems to return a string and not a date and so can not assignn it to DateTime dtPayDate
How is this possible please?
Thanks
-
Nov 9th, 2006, 05:49 AM
#2
Hyperactive Member
Re: format date
A date is a date does not matter the way in which it is stored on the system; VB.NET is using regional settings to show you the date, you can change this regional settings or use the globalization class change it for your application.
If you want to show the date on a textbox, you can use the format function to format it to the desired output. But then it will become an string not a date.
-
Nov 9th, 2006, 06:00 AM
#3
Thread Starter
Fanatic Member
Re: [RESOLVED] format date
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|