New Message on dotNET User Group Hyd

Regular _expression_ for Date and Time

Reply
  Reply to Sender   Recommend Message 2 in Discussion
From: Ravikanth[MVP]

Hi
Please check the following
 
_expression_:  ^(|(0[1-9])|(1[0-2]))\/((0[1-9])|(1\d)|(2\d)|(3[0-1]))\/((\d
{4}))$
Description:   This _expression_ matches dates formatted as MM/DD/YYYY where months and days must be 2 digits each, zero padded. It is not perfect - it allows DD to be from 01 to 31 regardless of the month. 
Matches:  [01/01/2001], [02/30/2001], [12/31/2002] 
 
_expression_:  ^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$
Description:   Accepts data of time in format h:mm and hh:mm ^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$ in php [0-23]:[0-59]{2} (posix) 
Matches:  [0:00], [23:00], [00:59]

HTH
Ravikanth[MVP]

View other groups in this category.

Click here!
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to