G Guest May 12, 2005 #2 Hi, You can use Convert.ToDateTime("1982-12-12"); Convert.ToDateTime("19820507"); Hope it helps. Sachi
Hi, You can use Convert.ToDateTime("1982-12-12"); Convert.ToDateTime("19820507"); Hope it helps. Sachi
K Katy King May 14, 2005 #3 From: "Kylin" <[email protected]> | Subject: How to convert the String to Datetime | | eg : | 19820507 | 1982-12-12 | For those particular formats, you'll want DateTime.ParseExact(). For example, DateTime.ParseExact("19820507", "yyyyMMdd", DateTimeFormatInfo.InvariantInfo); DateTime.ParseExact("1982-12-12", "yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo); Katy
From: "Kylin" <[email protected]> | Subject: How to convert the String to Datetime | | eg : | 19820507 | 1982-12-12 | For those particular formats, you'll want DateTime.ParseExact(). For example, DateTime.ParseExact("19820507", "yyyyMMdd", DateTimeFormatInfo.InvariantInfo); DateTime.ParseExact("1982-12-12", "yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo); Katy