moment
A point in time with its time zone, such as when a call started or when an appointment is booked.
At a glance
- Stored as: the value itself, written inline wherever it is used.
Writing
Write an ISO 8601 date and time. The time zone decides which instant it is, so give one whenever you can:
- With a zone name in brackets,
2026-05-12T09:00:00-07:00[America/Los_Angeles], or without the offset,2026-05-12T09:00[America/Los_Angeles]. An offset that contradicts the zone at that instant is refused, and the error names the right one. - With an offset only,
2026-07-25T15:00-04:00. The instant is exact, and the zone chosen keeps your wall clock: your time zone or your organization's when its offset matches, else a US zone with that offset at that date (-06:00is Denver in July and Chicago in January), else a fixed-offset zone. An offset of a part hour, such as+05:30, with no matching zone is kept in UTC. - With neither,
2026-07-25 15:00. It is read in your time zone, else the record's own time zone where it has one, else your organization's default (set directly, or taken from its address). It is never assumed to be UTC: with no zone to use, it is refused.
Z and +00:00 mean UTC. A trailing zone word is understood
(2026-07-25T15:00 eastern, … ET, … America/Chicago), and so are written-out dates
(July 25, 2026 3pm) and ages (3 days ago).
Where clocks change, a wall time that happens twice, when they go back, is the earlier
one, and a wall time that is skipped, when they go forward, lands just after the gap:
2026-03-08T02:30[America/New_York] is stored as 03:30.
Every value has one spelling: seconds always, fractions of a second only when they are
not zero, UTC as 2026-05-12T16:00:00Z, any other zone as its offset and name,
2026-05-12T09:00:00-07:00[America/Los_Angeles].
Written as
A JSON string whose schema format is moment.
Reading
Responses give a moment with its offset and without the zone name:
2026-05-12T09:00:00-07:00. Any ISO 8601 reader understands it, and the offset fixes
both the instant and the local time. Writing it back keeps both.
Querying
HQL compares moments as instants. The value you write is turned into UTC before it is
compared, so give it an offset or a zone. A date or time without one is read as UTC,
not in your time zone: "2026-11-02" is midnight UTC. A date alone as the upper end
of BETWEEN includes that whole day.
Call | start_time >= "2026-11-02T00:00:00-08:00" AND start_time < "2026-11-03T00:00:00-08:00" | select id, start_time
For a time relative to now, use NOW() with an interval, or an age such as
"3 days ago" or "2 hours ago". Words such as "yesterday" or "last monday" are
not understood here.
Call | start_time >= NOW() - INTERVAL '7 days' | select id, start_time | limit 50
Subtracting one moment from another gives the time between them, in seconds:
Call | end_time - start_time > INTERVAL '3 minutes' | select id, end_time - start_time | limit 20
The HQL reference lists the date spellings a filter accepts.
In agent tools
A tool argument also takes a date and time in plain words, such as "tomorrow at 5pm", and reads it like any time without an offset: in the caller's time zone, else the organization's. The argument's description tells the agent how to write the offset.
Operations
Through the dtypes resource: