YouTip LogoYouTip

Func Datevalue

# VBScript DateValue Function * * Complete VBScript Reference Manual](#) * * * The DateValue function converts a string to a Date. **Note:** If the year part is omitted in the date, the current year from the computer system date will be used. **Note:** If the date parameter contains time information, that time information will not be returned. If invalid time information is included in the date, a run-time error will occur. ### Syntax DateValue(date) | Parameter | Description | | :--- | :--- | | date | Required. A date between January 1, 100 and December 31, 9999, or any expression that represents a date, time, or both. | ## Example ## Example document.write(DateValue("31-Jan-10")) document.write("
") document.write(DateValue("31-Jan")) The above example outputs: 1/31/2010 1/31/2010 [Try it Yourself Β»](#) * * Complete VBScript Reference Manual](#)
← Func DayFunc Dateserial β†’