faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems : Times/Dates

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 3 people (67%) answered Yes
Recently 2 of 3 people (67%) answered Yes

Entry

How do you make sure a date is valid i.e. not January 45,2002?

Mar 23rd, 2004 00:31
Jason Benson, Jeff Stevenson,


Use the IsDate function.

Example:

<%
Response.Write IsDate("January 45, 2002")
%>
Outputs: "False"

<%
Response.Write IsDate("January 15, 2002")
%>

Outputs: "True"

hope that helps
jb



© 1999-2004 Synop Pty Ltd