Date()

Syntax

Date.q = Date([Year, Month, Day, Hour, Minute, Second])
Description
Returns the date value created from the given parameters, or the local system time if no parameters are specified.

Parameters

Year, Month, Day, Hour, Minute, Second (optional) The components used to create the date. If these parameters are not specified, the local system time is returned. The allowed range for the Year value is 1601 to 9999.

Return value

Returns the specified date value. If the given parameters are not valid (or outside the supported date range) then -1 will be returned.

Example

  Debug Date() / (3600*24*365)  ; will print the number of years since 01/01/1970 and now
  Debug Date(1999, 12, 31, 23, 59, 59)  ; will print '946684799' (number of seconds between 01/01/1970 0:00:00 and 12/31/1999 23:59:59)

See Also

FormatDate(), DateUTC() Year(), Month(), Day(), Hour(), Minute(), Second()

Supported OS

All

<- ConvertDate() - Date Index - DateUTC() ->