the toDate function in the 3.0.1 validation script can be used to "cast" a
value to a datetime. it returns undefined if the conversion fails.
if(typeof (date=toDate(yourTimeValue, "hh24:nn"))=="undefined") {
//validation fails
}
----Original Message Follows----
From: "Kaushik Pawar" <kaushik_pawar@...>
Reply-To: validation@yahoogroups.com
To: validation@yahoogroups.com
Subject: [validation] Time Validation (24 hour format) using Regular
Expression
Date: Mon, 08 Sep 2003 14:12:06 -0000
Hello everybody,
I am trying to build a regular expression to validate time data in 24-
hour format (without AM/PM).
It should be able to validate time strings like - 08:59, 00:30, 23:00
etc. But should invalidate 24:00, 25:87 etc...
Can anybody please help me.
Regards,
Kaushik.
_________________________________________________________________
Send and receive larger attachments with Hotmail Extra Storage.
http://join.msn.com/?PAGE=features/es