rickster57
New member
- Joined
- Sep 7, 2007
- Messages
- 2
- Programming Experience
- Beginner
Does any one know how to change the Date Format in Regional Settings via vb.net?
I'm trying to change it to yyyy-MM-dd using the following code that I found on the internet but it changes nothing.
Thanks in advance
Dim ci As New System.Globalization.CultureInfo("en-US", True)
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("en-US")
Dim newCi As System.Globalization.CultureInfo = CType(ci.Clone(), System.Globalization.CultureInfo)
newCi.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"
System.Threading.Thread.CurrentThread.CurrentCulture = newCi
I'm trying to change it to yyyy-MM-dd using the following code that I found on the internet but it changes nothing.
Thanks in advance
Dim ci As New System.Globalization.CultureInfo("en-US", True)
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("en-US")
Dim newCi As System.Globalization.CultureInfo = CType(ci.Clone(), System.Globalization.CultureInfo)
newCi.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"
System.Threading.Thread.CurrentThread.CurrentCulture = newCi