C# datetime format change

前端 未结 3 463
天涯浪人
天涯浪人 2021-01-27 05:25

I want to convert datetime.now format which is \"dd/mm/yyyy hh:mm:ss AM/PM\" to US time format i.e. \"mm-dd-yyyy hh:mm:ss AM/PM\". More over i

3条回答
  •  别那么骄傲
    2021-01-27 06:05

    DateTime usDateTimeFormat = DateTime.Parse(DateTime.Now , 
    System.Globalization.CultureInfo.GetCultureInfo("en-us"));
    

提交回复
热议问题