My projects Culture is "ru-RU".
I want to represent my Date object in a short date string format in another culture (e.g. "en-US" ).
I can approach this, by changing my threads culture.
Dim myDTFI As Globalization.DateTimeFormatInfo = New Globalization.CultureInfo("en-US", False).DateTimeFormat
lblDate.Text = myDate.ToString(myDTFI.ShortDatePattern)
Member
1 Points
62 Posts
ToShortDateString in another Culture
Sep 29, 2006 11:05 AM|artashes|LINK
Hello!
My projects Culture is "ru-RU".
I want to represent my Date object in a short date string format in another culture (e.g. "en-US" ).
I can approach this, by changing my threads culture.
Or using tostring
myDate.ToString("yyyy*MM*dd")
But is it the best method? Is there something like myDate.ToShortDateString (curCulture as CultureInfo ) [:)] ???
Thanks
Artashes
All-Star
43204 Points
10243 Posts
MVP
Re: ToShortDateString in another Culture
Sep 29, 2006 11:20 AM|DarrellNorton|LINK
Here are some practices Microsoft recommends:
http://msdn.microsoft.com/en-us/library/w7x1y988.aspx
And some others:
http://msdn.microsoft.com/msdnmag/issues/05/03/CultureInfo/default.aspx
http://msdn.microsoft.com/msdnmag/issues/04/03/Bugslayer/
Darrell Norton's Blog
Please click "Mark as Answer" if this helped you.
Member
1 Points
62 Posts
Re: ToShortDateString in another Culture
Sep 30, 2006 06:00 AM|artashes|LINK
I found the solution in your links!
Thanks a lot