Date and Time Functions
ActiveSpaces provides support for several date and time functions. The date and time functions return either a string or a double.
The following is the list of date and time functions supported.
Date and Time Function | Returns |
---|---|
date(timevalue[, modifier[, modifier, …]]) | The date as a string in the format YYYY-MM-DD |
time(timevalue[, modifier[, modifier, …]]) | The time as a string in the format HH:MM:SS |
datetime(timevalue[, modifier[, modifier, …]]) | The date and time as a string in the format YYYY-MM-DD HH:MM:SS |
julianday(timevalue[, modifier[, modifier, …]]) | The number of days since noon in Greenwich on November 24, 4714 B.C as a double. |
string
,
double
,
long
, and
datetime
. The following table shows how each of the data types represent date and time:
Data Type | Representation of Date and Time |
---|---|
string | ISO_8601 strings. For example, "YYYY-MM-DD HH:MM:SS.SSS" |
double | Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar |
long | (default) as Julian day numbers. See type double in the earlier row. |
long | Unix Time, the number of seconds since 1970-01-01 00:00:00 UTC |
datetime | two 64-bit integers; one for the number of seconds since January 1, 1970 (Unix epoch), and one for the number of nanoseconds after the time that the
sec component denotes.
|
The following are examples of using the date 2016-12-24 00:00:00 as values in the different column types:
string - "2016-12-24T00:00:00"
. For details, see timevalue Format.double - 2457746.50000
long - 1482566400 (Unix time)
datetime - [1482566400, 0]
Subtopics