util.Datetime methods

Methods for the util.Datetime class.

Table 1. Class methods
Name Description
format(
   t DATETIME q1 TO q2,
   format STRING
)
  RETURNS STRING
Formats a date/time value based on a specified format.
fromSecondsSinceEpoch(
  t FLOAT
 )
  RETURNS DATETIME q1 TO q2
Converts a number of seconds since Epoch to a date/time.
getCurrentAsUTC( )
  RETURNS DATETIME YEAR TO FRACTION(5)
Returns the current date/time in UTC.
parse(
  s STRING,
  format STRING
)
  RETURNS DATETIME q1 TO q2
Converts a string to a DATETIME value based on a specified format.
toLocalTime(
  t DATETIME q1 TO q2
 )
  RETURNS DATETIME q1 TO q2
Converts a UTC date/time to the local time.
toSecondsSinceEpoch(
  t DATETIME q1 TO q2
 )
  RETURNS FLOAT
Converts a date/time to a number of seconds since Epoch.
toUTC(
   t DATETIME q1 TO q2
)
  RETURNS DATETIME q1 TO q2
Converts a date/time value to the UTC date/time.