grivers
Posts: 28
|
| Posted: 07/13/2006, 8:55 AM |
|
Can anyone tell me what the regular expression is for date fields and for time fields please?
dd/mm/yyyy
hh:mm:ss
Thanks.
|
 |
 |
grivers
Posts: 28
|
| Posted: 07/14/2006, 12:59 AM |
|
NOt to worry I found the code needed to validate date and time.
If anyone is interested here it is.
Date format dd/mm/yyyy
^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$
time format hh:mm
^([0-23]{1,2}) [0-59]{1,2})$
By the way the unhappy face is meant to be a semi colon and opening bracket.
|
 |
 |
DonB
|
| Posted: 07/14/2006, 5:31 AM |
|
Anytime I need a pattern, I look at regexlib.com - the site has just about
anything you'd ever imagine.
--
DonB
http://www.gotodon.com/ccbth
"grivers" <grivers@forum.codecharge> wrote in message
news:644b74ee2ed8af@news.codecharge.com...
> NOt to worry I found the code needed to validate date and time.
>
> If anyone is interested here it is.
>
> Date format dd/mm/yyyy
>
> ^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$
>
> time format hh:mm
>
> ^([0-23]{1,2}) [0-59]{1,2})$
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|