GetDateTime Function

Action

Captures the current date and time from the host system and returns a DATETIME value.

Syntax

Datetime = GetDateTime()
Variable Description
Datetime The returned current date and time. DATETIME.

Example

DATETIME DayAndTime
STRING sTime
STRING sDate
// get current date and time
DayAndTime = GetDateTime ()
// format current date and time
sTime = FormatDateTime(DayAndTime, "hh:nn:ss AM/PM")
sDate = FormatDateTime(DayAndTime, "mm/dd/yy")
Print("Script started at {sTime} on {sDate}.")