Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

HTML Reference
Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

DateValue

The DateValue function will convert an ASP string variable into a date. If the string cannot be converted to a date value, then a runtime error will be generated.

If you wish to check for this runtime error and prohibit the script from throwing the error, you may wrap the DateValue function with an error handler as shown in the example below:

Dim sDate, dDate

sDate = "02/29/2002"
On Error Resume Next
dDate = DateValue(sDate)
If Err.Number <> 0 Then
Response.Write "An error occurred with DateValue: " & sDate
End If
On Error Goto 0

Orvado Technologies

ASP Nuke CMS
Free Open Source
Content Manager
HomeFix Boards
Home Remodeling
Message Boards

Contact Us | Contribute | About | Site Map



"I only regret that I have one life to lose for my country." - Nathan Hale

©2007 Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.