In ASP.NET 2.0, you can use the DateTime.TryParse method to parse your date strings.
If the TryParse was not successful, then it would return false. Also the DateTime returning from the output parameterwil be set to DateTime.MinValue.DateTime dt;
bool isSuccessful = DateTime.TryParse("05/28/2007",out dt);
Make sure you have the "out" keyword at the beginning of the second parameter, since this parmeter is an output parameter.
1 comment:
good work, if you want to get more experience in ASP.NET 2.0 i advise you to take a look at
http://khaskhoussy.blogspot.com
a chosen article and a proffissionals ebooks are available to download
Post a Comment