Date and time modifiers are natural language functions for manipulating date and time values. These functions are useful for tasks like setting date and time components, converting between time zones, and more.
This is the summary of the available date and time modifiers for quick reference:
|Set time||Adjusts the time component of a date time value.|
This modifier changes the time component of a date-time value, leaving the date component unchanged. This is useful when you need to indicate a specific time of day, such as noon or midnight, especially when comparing date-time values.
You can use this modifier with any date-time value, including local date times and instants. In the case of local date times, they are first converted to an instant using the default time zone, and then the time component is set.
This modifier has the following syntax:
/*<value>*/ at /*<time>*/
These are the supported parameters:
The date-time value for which to set the time component. This parameter is automatically converted to an instant in the configured time zone if necessary.
The time you want to set. This can be a time value or a valid ISO 8601 time string, such as 12:00:00 or 12:00.
Here is a basic example of how to get today's date at noon:
today at "12:00"
Because the ISO 8601 standard allows you to omit subcomponents of a time value, you can also write the previous example as:
today at 12