Title |
Test
Find
Date and Time Validation
|
Expression |
(^0?[1-9]|^1[0-2])\/(0?[1-9]|[1-2][0-9]|3[0-1])\/(19|20)?[0-9][0-9](\s(((0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?)|((0?[0-9]|1[0-2]):[0-5][0-9](:[0-5][0-9])?\s(AM|PM))))?$ |
Description |
Expression to validate a date with or without time in standard or 24 hour format with optional milliseconds (01/12/08 23:31:05 or 5/12/1974 11:59 PM). |
Matches |
01/28/08 22:34:12 | 10/23/1952 5:23:01 PM | 6/2/02 22:59 | 5/13/04 |
Non-Matches |
1/32/08 | 12/29/005 | 6/14/05 23:00:02 PM | 10/2/02 13:00 AM |
Author |
Rating:
Not yet rated.
Gregg Jensen
|
Source |
Gregg Jensen |
Your Rating |
|
Title: dd/mm/yy hh:mm
Name: Rima
Date: 4/1/2008 1:09:49 AM
Comment:
Hi !
I need expression for dd/mm/yyyy hh:mm with optional seconds