Skip to content

Commit 90f1992

Browse files
rsill-neo4jgem-neo4jJPryce-Aklundh
authored
Document format function (#1374)
Co-authored-by: Gem Lamont <[email protected]> Co-authored-by: Jens Pryce-Åklundh <[email protected]>
1 parent b07fd09 commit 90f1992

File tree

7 files changed

+434
-0
lines changed

7 files changed

+434
-0
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
** xref:functions/string.adoc[]
101101
** xref:functions/temporal/duration.adoc[]
102102
** xref:functions/temporal/index.adoc[]
103+
** xref:functions/temporal/format.adoc[]
103104
** xref:functions/user-defined.adoc[]
104105
** xref:functions/vector.adoc[]
105106

modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,20 @@ If the points are in a Cartesian CRS, the function returns the Euclidean distanc
542542
|===
543543

544544

545+
[[temporal-format-functions]]
546+
=== Temporal format functions
547+
548+
[options="header", cols="2a,5a"]
549+
|===
550+
| Cypher feature
551+
| Description
552+
553+
| xref:functions/temporal/format.adoc[`format()`]
554+
| Returns the temporal value as an ISO-formatted `STRING` or as a `STRING` formatted by the provided pattern.
555+
556+
|===
557+
558+
545559
[[vector-functions]]
546560
=== Vector functions
547561

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ For more information, see xref:queries/select-version.adoc[].
3232
| Feature
3333
| Details
3434

35+
a|
36+
label:functionality[]
37+
label:new[]
38+
[source, cypher, role="noheader"]
39+
----
40+
WITH datetime('1986-11-18T6:04:45.123456789+01:00[Europe/Berlin]') AS dt
41+
RETURN format(dt, "MM/dd/yyyy") AS US, format(dt, "dd/MM/yyyy") AS EU
42+
----
43+
44+
| Cypher's new xref:functions/temporal/format.adoc[`format()`] function can create dynamically formatted string representations of temporal instance and duration types.
45+
3546
a|
3647
label:functionality[]
3748
label:new[]
@@ -40,6 +51,7 @@ New operator: `LockNodes`
4051

4152

4253
a| Introduced xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-lock-nodes[`LockNodes`] operator, sometimes used in conjunction with the `LockingMerge` operator to lock nodes.
54+
4355
|===
4456

4557
[[cypher-deprecations-additions-removals-2025.08]]

modules/ROOT/pages/functions/index.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,23 @@ Values of the xref::values-and-types/temporal.adoc[temporal types] -- `DATE`, `Z
764764
|===
765765

766766

767+
[role=label--cypher-25-only label--new-Neo4j-2025.09]
768+
[[header-query-functions-temporal-format]]
769+
== Temporal format functions
770+
771+
These functions format temporal instance and duration values:
772+
773+
[options="header"]
774+
|===
775+
| Function | Signature | Description
776+
777+
1.1+| xref::functions/temporal/format.adoc#query-functions-temporal-format-function[`format()`]
778+
| `format(value :: DATE \| LOCAL TIME \| ZONED TIME \| LOCAL DATETIME \| ZONED DATETIME \| DURATION[, pattern :: STRING]) :: STRING`
779+
| Returns the temporal value as an ISO-formatted `STRING` or as a `STRING` formatted by the provided pattern.
780+
781+
|===
782+
783+
767784
[[header-query-functions-user-defined]]
768785
== User-defined functions
769786

0 commit comments

Comments
 (0)