M
mhulme
Hi, first post.
I've had no success converting a date in en-US format to another
language format base on a parameter to my function. I think i'm
missing something stupid --
pseudocode:
function doDate (byval strLocale as string, byval ENDate as string)
dim strReturn as string
Dim myDTFI As DateTimeFormatInfo = New CultureInfo(strLocale,
True).DateTimeFormat
strReturn = DateTime.ParseExact(ENDate, myDTFI.ShortDatePattern,
CultureInfo.GetCultureInfo(New CultureInfo(strLocale, True).LCID))
return strReturn
end function
I want doDate("de-DE", "10/13/2006") to return "13.10.2006" for
instance. ( I have 20+ other languages to handle too)
Thanks,
MH
I've had no success converting a date in en-US format to another
language format base on a parameter to my function. I think i'm
missing something stupid --
pseudocode:
function doDate (byval strLocale as string, byval ENDate as string)
dim strReturn as string
Dim myDTFI As DateTimeFormatInfo = New CultureInfo(strLocale,
True).DateTimeFormat
strReturn = DateTime.ParseExact(ENDate, myDTFI.ShortDatePattern,
CultureInfo.GetCultureInfo(New CultureInfo(strLocale, True).LCID))
return strReturn
end function
I want doDate("de-DE", "10/13/2006") to return "13.10.2006" for
instance. ( I have 20+ other languages to handle too)
Thanks,
MH