util.Datetime methods

Methods for the util.Datetime class.

Table 1. Class methods
Name Description
util.Datetime.format(
   value DATETIME q1 TO q2,
   fmt STRING
)
  RETURNING res STRING
Formats a datetime value according to format specification.
util.Datetime.fromSecondsSinceEpoch(
  seconds FLOAT
 )
  RETURNING local DATETIME q1 TO q2
Converts a number of seconds since Epoch to a datetime.
util.Datetime.getCurrentAsUTC( )
  RETURNING utc DATETIME YEAR TO FRACTION(5)
Returns the current date/time in UTC.
util.Datetime.parse(
  src STRING,
  fmt STRING
)
  RETURNING res DATETIME q1 TO q2
Converts a string to a DATETIME value according to a format specification.
util.Datetime.toLocalTime(
  utc DATETIME q1 TO q2
 )
  RETURNING local DATETIME q1 TO q2
Converts a UTC datetime to the local time.
util.Datetime.toSecondsSinceEpoch(
  local DATETIME q1 TO q2
 )
  RETURNING seconds FLOAT
Converts a datetime to a number of seconds since Epoch.
util.Datetime.toUTC(
   local DATETIME q1 TO q2
)
  RETURNING utc DATETIME q1 TO q2
Converts a datetime value to the UTC datetime.