L
Leszek
Hello,
I believe there must be somwhere in .NET a method to easily deal with the
following situation:
1. A user enters a date (myDate) in a format dd/mm/yyyy
2. A method checks if the myDate is properly formatted
The method might look like this:
isCorrect = IsDateCorrect(myDate, "dd/mm/yyyy");
isCorrect == true - myDate is formatted properly
isCorrect == false - myDate has any incorrect characters (letters), or it is
incorrect (5/13/2003 - 13th month, or 30/2/2003), or it is formatted
inproperly (10/11-2003 or 1/1/98)
Is there somewhere such a IsDateCorrect function available?
Thanks,
Leszek Taratuta
I believe there must be somwhere in .NET a method to easily deal with the
following situation:
1. A user enters a date (myDate) in a format dd/mm/yyyy
2. A method checks if the myDate is properly formatted
The method might look like this:
isCorrect = IsDateCorrect(myDate, "dd/mm/yyyy");
isCorrect == true - myDate is formatted properly
isCorrect == false - myDate has any incorrect characters (letters), or it is
incorrect (5/13/2003 - 13th month, or 30/2/2003), or it is formatted
inproperly (10/11-2003 or 1/1/98)
Is there somewhere such a IsDateCorrect function available?
Thanks,
Leszek Taratuta