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

Free Components

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, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"It is better to deserve honors and not have them than to have them and not deserve them." - Mark Twain

©2012 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.