How to convert string with unusual format into datetime

前端 未结 9 932
半阙折子戏
半阙折子戏 2021-01-19 17:15

I\'m using .NET 3.5 and I have a date that comes in as string in the following format:

Tue Jan 20 20:47:43 GMT 2009

First questi

9条回答
  •  梦谈多话
    2021-01-19 17:44

    Try this:

    DateTime.TryParse(Tue Jan 20 20:47:43 GMT 2009", out objDt);
    

    You need to give an output value. Use If and if it returns true then its a valid date.

    HTH

提交回复
热议问题