You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/functions/temporal/format.adoc
+209-5Lines changed: 209 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,9 +78,9 @@ Most characters change yield a different output when they are repeated.
78
78
79
79
| Some characters cannot be applied to certain types, for instance, `u` cannot be used to construct a string for a `LOCAL TIME` because it represents a year which is not part of the temporal value.
80
80
81
-
| The "text" style is determined by how often the pattern character is repeated: less than 4 characters result in the short form ("AD"). Exactly 4 characters result in the full form ("Anno Domini"). Exactly 5 characters result in the narrow form ("A").
81
+
| The "text" presentation is determined by how often the pattern character is repeated: less than 4 characters result in the short form ("AD"). Exactly 4 characters result in the full form ("Anno Domini"). Exactly 5 characters result in the narrow form ("A").
82
82
83
-
The characters 'L', 'q', and 'c' represent the standalone form of the text styles.
83
+
The characters 'L', 'q', and 'c' represent the standalone form of the text presentation.
84
84
85
85
| A single "number" character outputs the minimum number of digits without padding. With more "number" characters, the number of digits is used as the width of the output field, with the value zero-padded as necessary.
86
86
@@ -152,13 +152,13 @@ More characters will result in an error.
152
152
153
153
|===
154
154
155
-
.awesome example
155
+
.Formatting with year, month, day, hour, minute, second, fraction-of-second and zone-offset
156
156
======
157
157
158
158
.Query
159
159
[source, cypher, indent=0]
160
160
----
161
-
WITH datetime('2024-06-27T14:30:45.123456789+02:00[Europe/Paris]') AS dt
161
+
WITH datetime('1986-11-18T6:04:45.123456789+01:00[Europe/Berlin]') AS dt
162
162
RETURN format(dt, "yyyy-MM-dd'T'HH:mm:ss.SSSZ") AS x
163
163
----
164
164
@@ -167,13 +167,217 @@ RETURN format(dt, "yyyy-MM-dd'T'HH:mm:ss.SSSZ") AS x
167
167
|===
168
168
169
169
| x
170
-
| "2024-06-27T14:30:45.123+0200"
170
+
| "1986-11-18T06:04:45.123+0100"
171
+
1+d|Rows: 1
172
+
173
+
|===
174
+
175
+
======
176
+
177
+
.Formatting with day-of-week, month-of-year, day-of-month, era and year
178
+
======
179
+
180
+
.Query
181
+
[source, cypher, indent=0]
182
+
----
183
+
WITH datetime('1986-11-18T6:04:45.123456789+01:00[Europe/Berlin]') AS dt
0 commit comments