Declarative Objectivity (DO) Language : Tokens : Date-Time Tokens
Date-Time Tokens
Date-time tokens include the calendar and clock components that make up dates, times, and datetimes (timestamps).
Syntax 
Quick Look 
Add a date to a rental company’s list of high-volume dates, and return the list:
UPDATE RentalCompany ADD 2017-01-31 TO highVolumeDates RETURN highVolumeDates;
Create a new reservation for a car that will be picked up by 1:15 p.m. on January 17, 2017, local time:
CREATE Reservation{timestamp:$$NOW, pickup:2017-01-17 13:15:00};
Create a new reservation for a car that will be picked up by 1:15 p.m. on January 17, 2017 UTC:
CREATE Reservation{timestamp:$$NOW, pickup:2017-01-17 13:15:00Z};
Create a new reservation for a car that will be picked up by 1:15 p.m. on January 17, 2017 Pacific Standard Time:
CREATE Reservation{timestamp:$$NOW, pickup:2017-01-17 13:15:00 -08:00};
Discussion 
Date, time, and datetime values can be stored persistently as attributes of objects. You can use Literal Expressions to describe and test these values.
Dates consist of calendar components.
Times consist of clock components
Datetimes (timestamps) combine date and time components. Datetimes may be expressed in the local time standard, the Coordinated Universal Time (UTC) standard, or as a local time in some time zone that is offset from UTC.
The following table describes the calendar, clock, and time-zone components used in the syntax:
Component
Description
YYYY
Four-digit year, from 0001 Common Era to 9999 Common Era
MM
Two-digit month, from 01 (January) through 12 (December)
DD
Two-digit day of the month, from 01 through 31
hh
Two-digit number of hours on a 24-hour clock, from 0 (midnight) through 23
mm
Two-digit number of minutes, from 0 to 59
ss
Two-digit number of seconds, from 0 to 59
.s
One or more digits representing a decimal fraction of a second, such as a number of milliseconds. Time values have 100-microsecond resolution, so values are truncated to 4 decimal places.
Z
Suffix indicating that the datetime is expressed in the Coordinated Universal Time (UTC) standard. UTC is the time as measured at zero degrees longitude, the UTC origin point.
Omit Z to express a datetime in the local time standard. Local time is the system time on the computer executing the DO statements.
+hh:mm
 
Positive UTC offset indicating the number of hours and minutes east of 0 degrees longitude. A datetime literal that includes a positive offset represents a local time that is ahead of (later than) UTC by the specified number of hours and minutes.
-hh:mm
 
Negative UTC offset indicating the number of hours and minutes west of 0 degrees longitude. A datetime literal that includes a negative offset represents a local time that is behind (earlier than) UTC by the specified number of hours and minutes.
Note:The order and length of calendar and clock components are fixed. Only date components allow a choice of component separator (- or /).