Return a Date from a numeric Year, Month and Day.
Syntax DateSerial (Year, Month, Day) Key Year An integer from 100-9999 representing the year. Month An integer from 1-12 representing the month. Day An integer from 1-31 representing the day. These may also be variables or numeric expressions.
dtmXMAS=DateSerial(2010,12,25) WScript.Echo dtmXMAS
PowerShell equivalent, use the Get-Date cmdlet and pass the appropriate values:
$mydate = get-date -y 2024 -mo 12 -day 31
“I always play women I would date” ~ Angelina Jolie
Date - The current system 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: Get-Date -y 2015 -mo 12 -day 31