web 2.0

ASP/VBScript DateValue()

ASP/VBScript DateValue() Returns a Variant  of subtype Date.

ShotDev Focus:
- Using Asp and DateValue() function.

Syntax


DateValue(date)

The date argument is normally a string expression representing a date from January 1, 100 through December 31, 9999. However, date can also be any expression that can represent a date, a time, or both a date and time, in that range.

Example

asp_datevalue.asp


<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Response.write DateValue("01-Sep-2010")&"<br>"
Response.write DateValue("Sep-01-2010")&"<br>"
Response.write DateValue("Sep 01 2010")&"<br>"
Response.write DateValue("09-01-2010")&"<br>"
Response.write DateValue("09/01/2010")&"<br>"
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_datevalue.asp

Screenshot

ASP/VBScript & DateValue()

.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.