Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

VBScript DateValue function


May 13, 2021 VBScript


Table of contents


VBScript DateValue function

The VBScript DateValue function returns the Variant of the Date sub-type.


VBScript DateValue function Complete VBScript reference manual

The DateValue function converts strings to Date.

Note: If the year portion of the date is omitted, the function uses the current year from the computer system date.

Note: If the date parameter contains time information, the time information is not returned. If the date contains invalid time information, a run-time error occurs.

Grammar

DateValue(date)

Parameters

parameter describe
date Required.A date between January 1 to 9999 to January 1 to 9999, or any expression that represents a date, time or date time.
<script type="text/vbscript">

document.write(DateValue("31-Jan-10"))
document.write("<br />")
document.write(DateValue("31-Jan"))

</script>

The above example output results:

1/31/2010
1/31/2010

Try it out . . .


VBScript DateValue function Complete VBScript reference manual