Features
Ask DevGuru
ASP Resources
Find the Bug
Knowledge Base
Links
Tips of the Week
Tutorials
Products
dgCalendar
dgCharge New!
dgChart New!
dgFileUpload
dgReport New!
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Link to Us
Merchandise
Sponsorships
Testimonials
What's New
Technologies
ADO 2.6
ASP
CSS2
HTML
JavaScript
Jet SQL
Transact-SQL Syntax
VBScript
WML
WMLScript
WSH
XML DOM
All Functions
IsDate Function
FUNCTION: CDate( )
Implemented in version 1.0
You can determine the expression subtype by using the function
VarType( )
.
CDate
(Date)
The
CDate
function converts any valid date and time expression to the variant of subtype
Date
.
The default date output will be of the format: **/**/** The default time output will be of the format: **:**:** *M Converted date values can range from January 1, 100 to December 31, 9999
Code:
<% anydate = "June 26, 1943" %>
<% =CDate(anydate) %>
Output:
6/26/43
Code:
<% anydate = #6/26/43# %>
<% =CDate(anydate) %>
Output:
6/26/43
Code:
<% anytime="2:23:59 PM" %>
<% =CDate(anytime) %>
Output:
2:23:59 PM
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information