Last post Aug 31, 2007 05:13 PM by FaithRaven
Aug 30, 2007 08:11 PM|FaithRaven|LINK
ToLongDateString EN-GB returns
"10 June 2007"
ToLongDateString EN-US returns
"Sunday, June 10, 2007"
For the sake of my site's consistance, someone please tell me how can I have EN-US to return only
"June 10, 2007", without having "Sunday, " in front.
Aug 30, 2007 09:32 PM|d4dennis@inspir3|LINK
You can use of formatstring
DateTime.ToString("MMMM dd, yyyy");
For more information:
Aug 30, 2007 10:07 PM|d4dennis@inspir3|LINK
Furthur to my previous reply.
I don;t think you can get en-US without day of week. This is because the long date format is define within the class.
Try use of en-AU i think this is quite similar.
Let me know this is help ! or we can try something else . ;)
Aug 31, 2007 09:17 AM|FaithRaven|LINK
Well what I'm doing is get browser's culture and display the dates on my site using that culture. So It's not about the culture I use, is about the culture the user use so thats why I was wondering if there is a way to standardize it.
Aug 31, 2007 09:34 AM|d4dennis@inspir3|LINK
I don't you can do anything to change the DateTime.ToLongDateString()
ToLongDateString() is equivalant to ToString("dddd, MMMM dd, yyyy")
depends on the culture it will have different built-in formatstring.
en-US = dddd, MMMM dd, yyyy
en-GB = dd MMMM yyy
Aug 31, 2007 05:13 PM|FaithRaven|LINK
I have to find a work around then. Maybe there is a site which has all culture's date formats listed so I can see the ones having this problem so I know which cultures to replace ?