Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions modules/n1ql/pages/n1ql-language-reference/datefun.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,72 @@ The elements are given in the table below.
| Seconds since 1970-01-01 00:00:00 UTC
| `1624904579`

| `x`
| Same as `%D`
| `2021-06-28`

| `r`
| 12-hour time, hh:mm:ss AM/PM
| `07:22:59 AM`

| `X`
| Same as `%T`
| `19:22:59`

| `:z`
| UTC offset in the format, +HH:MM
| `+05:30`

| `::z`
| UTC offset in the format, +HH:MM:SS
| `+05:30:00`

| `:::z`
| UTC offset with minimum precision as required for the time zone
| `+05:30` or `+05:30:00`

| `V`
| ISO week number
| `27`

| `G`
| Year corresponding to the ISO week number
| `2025`

| `j`
| Day of the year
| `179`

| `q`
| Quarter of the year, 1-4
| `2`

| `w`
| Day of the week (Sunday=0)
| `1`

| `u`
| Day of the week (Monday=1, Sunday=7)
| `2`


| `U`
| Week number of year (Sunday is first day of the week)
| `27`

| `W`
| Week number of year (Monday is first day of the week)
| `27`

| `#`
| Time since Epoch in the format, [total hours]:mm:ss
| `406464:27:15`


| `@`
| Time since Epoch in the format, [total hours]:mm:ss.fff
| `406464:27:15.123`

|====

To specify a date format, you can put the format specifiers together in any order, along with any other characters as required.
Expand Down