|
-
Dec 10th, 2004, 01:24 AM
#1
Thread Starter
Frenzied Member
formating a date to dd/mm/yyyy format
Hello,
I am using a DateTime variable. But l want to change the format of the shortDateString from mm/dd/yyyy to the new format of dd/mm/yyyy.
I used the code below using, using System.Globalization. However, it won't change to this new format of dd/mm/yyyy
DateTime today = Convert.ToDateTime(DateTime.Today.ToShortDateString());
DateTimeFormatInfo dateFormat = new DateTimeFormatInfo();
dateFormat.ShortDatePattern = "dd/mm/yyyy";
today.ToString(dateFormat);
Can anyone help with this.
Many thanks in advance,
Steve
Last edited by steve_rm; Dec 11th, 2004 at 05:26 AM.
steve
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
|