Reference: Date Time Format Code
The following table describes the date-time format codes used with AQL calc operator timestamp conversion functions.
| Format Code | Description | Example |
|---|---|---|
%Y
|
Four-digit year | 2025 |
%y
|
Two-digit year | 25 |
%m
|
Two-digit month (01-12) | 01 |
%b
|
Name of the month | Jan |
%d
|
Two-digit day of the month (01-31) | 05 |
%H
|
Two-digit hour (00-23) | 13 |
%h
|
Two-digit hour (01-12) | 05 |
%M
|
Two-digit minute (00-59) | 37 |
%S
|
Two-digit second (00-59) | 45 |
%Q
|
Three-digit milliseconds (000-999) | 300 |
Note: If the string format is incorrect or the date is invalid, the AQL query returns an error message similar to the following:
INVALID_FUNCTION_ARGUMENT: Invalid format