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/deprecations-additions-removals-compatibility.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ WITH datetime('2024-06-27T14:30:45.123456789+02:00[Europe/Paris]') AS dt
41
41
RETURN format(dt, "yyyy-MM-dd'T'HH:mm:ss.SSSZ") AS x
42
42
----
43
43
44
-
| Cypher's new xref:functions/temporal/format.adoc[format function] can create dynamically formatted string representations of temporal instance and duration types.
44
+
| Cypher's new xref:functions/temporal/format.adoc[`format()]` function can create dynamically formatted string representations of temporal instance and duration types.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/functions/temporal/format.adoc
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
:description: Cypher provides a function for creating dynamically formatted string representations of temporal instance and duration types.
1
+
:description: Information about Cypher's function to format temporal instance and duration values.
2
2
:table-caption!:
3
3
4
4
[[query-functions-temporal-format]]
@@ -7,9 +7,9 @@
7
7
[[query-functions-temporal-format-function]]
8
8
== format()
9
9
10
-
The format function creates dynamically formatted string representations of temporal instance and duration types.
10
+
The `format()` function creates dynamically formatted string representations of temporal instance and duration types.
11
11
The output format can be customized via the `pattern` parameter.
12
-
Creating a pattern follows the rules for the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
12
+
The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
13
13
If no pattern is specified, the function returns an ISO-formatted string.
14
14
15
15
.Details
@@ -25,7 +25,8 @@ If no pattern is specified, the function returns an ISO-formatted string.
Cypher's instance types are `DATE`, `LOCAL TIME`, `ZONED TIME`, `LOCAL DATETIME` and `ZONED DATETIME`, refer to xref:/values-and-types/temporal.adoc#cypher-temporal-instants[temporal instants].
28
+
Cypher's instance types are `DATE`, `LOCAL TIME`, `ZONED TIME`, `LOCAL DATETIME` and `ZONED DATETIME`.
29
+
For more information, see xref:/values-and-types/temporal.adoc#cypher-temporal-instants[Values and types -> temporal instants].
29
30
30
31
Use the characters in xref:#query-functions-temporal-format-instance-types-characters[] to create a string pattern for instance types.
31
32
@@ -232,10 +233,12 @@ The three occurrences of `p` add one space character of padding to the two digit
232
233
233
234
Use the characters in xref:#query-functions-temporal-format-duration-types-characters[] to create a string pattern for duration types.
234
235
235
-
Cypher's duration type `DURATION` has components and component groups, see xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[components of durations].
236
+
Cypher's duration type `DURATION` has components and component groups.
237
+
For more information, see see xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[Values and types -> components of durations].
236
238
237
-
If the string pattern contains a character from a component group but does not contain a character denoting a longer duration from the same group, `format()` converts the longer duration to the equivalent duration with the character that is present, for example a missing `y` (year) will be converted to four quarters, if `q` is present in the string pattern.
238
-
This is because without a reference point, there is no way of determining the specifics of a duration.
239
+
If the string pattern contains a character from a component group but does not contain a character denoting a longer duration from the same group, `format()` converts the longer duration to the equivalent duration with the character that is present.
240
+
For example a missing `y` (year) will be converted to four quarters, if `q` is present in the string pattern.
241
+
This is because without a reference point, there is no way to determine the specifics of a duration.
0 commit comments