CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Regular Expression for date and time

Print topic Send  topic

Author Message
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.
View profile  Send private message
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.
View profile  Send private message
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/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.