Regional settings made at the operating system level

  • Thread starter Thread starter Karunakararao
  • Start date Start date
K

Karunakararao

Hi All

regional settings made at the operating system level. For example, Canada
uses a dd/mm/yyyy format while the US uses mm/dd/yyyy. and yyyy/mm/dd

how can i get this type date format :
iam using this code in C#:
System.DateTime.UtcNow.Date.ToString();

Regards
Venu.
 
Hi Karunakararao,

You can output a DateTime in any format you desire.
Take a look at the overloaded methods of DateTime.ToString
You can use a custom string format or an IFormatProvider, for instance a CultureInfo.DateTimeFormat (current culture?)
 
Back
Top