Convert from eng language to thai language. (month)

I want convert month from March to month name thai language (this is to convert March to มีนาคม, english to thailand)

Please guide me about it.

@fairymemay,

You can visit below site.
https://social.msdn.microsoft.com/Forums/en-US/3394ea03-1ad8-4301-a81e-4bd5a3b1e92c/how-to-convert-date-from-english-to-another-languages-in-vb-2008-or-2010?forum=vblanguage

get month index like for March index would be 3 and provide 3 to string of array.

Cheers,
Pankaj

1 Like

@fairymemay

Check as below for your reference

As DateTime.Now will take the today date and month, you can replace with your date string

Hope this may help you

Thanks

1 Like

@Srini84 If I have variable date_month = April
How to replace from your code?

Please guide me please.

@fairymemay

Pass your date variable in place of DateTime.Now

Hope this helps you

Thanks

Datetime.ParseExact("March", "MMMM", nothing).ToString("MMMM", New System.Globalization.CultureInfo("th-TH"))
output
“มีนาคม”

Datetime.ParseExact("April", "MMMM", nothing).ToString("MMMM", New System.Globalization.CultureInfo("th-TH"))
output
“เมษายน”

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.