How to convert any valid date string to a DateTime.

DateTimeFormatInfo pattern = new DateTimeFormatInfo() { ShortDatePattern = "your date pattern" };
DateTime date = Convert.ToDateTime("your date string",pattern);

 

posted @ 2013-08-02 16:55  Vincent.Dr  阅读(260)  评论(0编辑  收藏  举报