|
-
Jul 8th, 2010, 02:48 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Change date format
How do i change the date format from MM/dd/yyyy to dd/MM/yyyy?
-
Jul 8th, 2010, 02:51 AM
#2
Re: Change date format
What do you mean? In a computer? In a string? In a DateTime? Or what?
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Jul 8th, 2010, 02:55 AM
#3
Thread Starter
Addicted Member
Re: Change date format
the string is in dd/MM/yyyy format, but whenever I convert it using this code:
vb.net Code:
DATE1 = Date.ParseExact(tmp, "dd/MM/yyyy", Nothing)
It takes it into mm/dd/yyyy format for some strange reason.
Also gives me error on dates like 5/4/2010
-
Jul 8th, 2010, 03:06 AM
#4
Re: Change date format
It doesn't take it into any format. A Date object doesn't have any format at all. The IDE displays any and all dates in M/dd/yyyy format but that is just how the IDE displays it. It doesn't mean anything about the Date value itself, which is simply a number. No Date object has any format at all. It's only when you display the Date to the user, i.e. convert it to a String, that format is an issue. Rememebr this: a Date object has NO FORMAT at all. It's only when converting a Date to a String or a String to a Date that format is an issue.
-
Jul 8th, 2010, 03:15 AM
#5
Thread Starter
Addicted Member
Re: Change date format
Oh ok. Thanks for clearing that up for me.
Tags for this Thread
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
|