Quantcast
Channel: DaniWeb Solved Topics
Viewing all articles
Browse latest Browse all 582

How can I get my system short date format in a label in vb. Net

$
0
0

hello sir
how can I get my system short date format in a label in vb. net. I try this code :

Label1.Text = System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern()

but show wrong data. all time show "M/d/yyyy" format.

I change it(to "dd/MM/yyyy") manually and by coding result is same("M/d/yyyy") please help me.....

For Change the Format:

Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\International", "sShortDate", "dd/MM/yyyy")

Viewing all articles
Browse latest Browse all 582

Latest Images

Trending Articles



Latest Images