Hi,
I m using date picker control in my windows application. i want to set the date time format according to the regional settings of the system. can someone please help me in resolving this issue.
Hi,
I m using date picker control in my windows application. i want to set the date time format according to the regional settings of the system. can someone please help me in resolving this issue.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Niradhip ChakrabortyPosted Feb 22, 2009, 4:37 PM
setting checks. The following code excerpt will output the short date format
for the current user (dd/MM/yyyy for en-GB):
using System.Globalization;
.....
CultureInfo ci = CultureInfo.CurrentCulture;
Console.WriteLine(ci.DateTimeFormat.ShortDatePatte rn);