Convert date format of string to datetime MM/dd/yyyy when system date formate is dd/MM/yyyy

前端 未结 5 1915
逝去的感伤
逝去的感伤 2020-12-12 06:28

I need convert the date of string format \'MM/dd/yyyy\' to datetime format \'MM/dd/yyyy\' when the system date format is \'dd/MM/yyyy\'.

5条回答
  •  醉话见心
    2020-12-12 06:50

    try this

    string dateString="05/02/2014";
    DateTime txtmyDate =convert.toDateTime(dateString);
    

提交回复
热议问题