util.Datetime methods

Methods for the util.Datetime class.

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