Groups | Blog | Home
all groups > dotnet faqs > october 2007 >

dotnet faqs : how to check a date is valid or not


Raymond Chiu
10/4/2007 12:00:00 AM
Dear all,

How can I check the date is valid or not?
If I don't use exception handling, is there any way to do?

Thanks for your help,

Mr. Hing

Graeme Bradbury
10/4/2007 12:18:32 PM
Are you talking about getting a string representing a datetime and needing
to know if it's valid?
Then DateTime.TryParse(...) is what you're looking for.
http://msdn2.microsoft.com/en-us/library/system.datetime.tryparse.aspx


[quoted text, click to view]
AddThis Social Bookmark Button