DateValue

Return a Date from a string expression.

Syntax 
      DateValue (StringExpression)

Key
    StringExpression Any expression recognised by IsDate

Examples

dtmDemo=DateValue("28-Feb-10")
WScript.Echo dtmDemo

“What is freedom of expression? Without the freedom to offend, it ceases to exist” ~ Salman Rushdie

Related VBScript commands

Date - The current system date.
DateAdd - Add a time interval to a Date.
DateDiff - Return the time interval between two dates.
DatePart - Return a unit of time from a date.
DateSerial - Return a Date from a numeric Year, Month and Day.
Standard date and time notation - YYYY-MM-DD
Equivalent PowerShell cmdlet: $CastAsDate = [datetime] "2014-12-01"


 
Copyright © 1999-2024 SS64.com
Some rights reserved