C# - Regular Expression validating Date and Hour
Posted
by nettguy
on Stack Overflow
See other posts from Stack Overflow
or by nettguy
Published on 2010-04-11T14:06:42Z
Indexed on
2010/04/11
14:13 UTC
Read the original article
Hit count: 377
c#
|validation
I receive Date and time from CSV file
The received Date format is YYYMMDD (string) (there is no ":" ,"-","/" to
separate Year month and date).
The received time format is HH:MM (24 Hour clock).
I have to validate both so that (example) (i) 000011990 could be invalidated for date (ii) 77:90 could be invalidated for time.
The question is ,
Regular expression is the right candidate for do so (or) is there any other way to achieve it?
© Stack Overflow or respective owner