diff --git a/modules/ROOT/pages/values-and-types/temporal.adoc b/modules/ROOT/pages/values-and-types/temporal.adoc index 9d7fd4a25..106107711 100644 --- a/modules/ROOT/pages/values-and-types/temporal.adoc +++ b/modules/ROOT/pages/values-and-types/temporal.adoc @@ -511,145 +511,397 @@ For more information, see the xref::values-and-types/temporal.adoc#cypher-tempor [[cypher-temporal-specify-instant-examples]] === Examples -Below are examples of parsing instant values using various temporal functions. -More information about these temporal functions can be found xref::functions/temporal/index.adoc[here]. +To work with a particular temporal instant type, its corresponding xref:functions/temporal/index.adoc[function] must be used. +For example, in order to create a property value of type `ZONED DATETIME`, the xref:functions/temporal/index.adoc#functions-datetime[`datetime()`] function must be used. -.+datetime+ -====== +For specific examples, see: -Parsing a `ZONED DATETIME` using the _calendar date_ format: +* xref:values-and-types/temporal.adoc#examples-date[`DATE`] +* xref:values-and-types/temporal.adoc#examples-localtime[`LOCAL TIME`] +* xref:values-and-types/temporal.adoc#examples-zonedtime[`ZONED TIME`] +* xref:values-and-types/temporal.adoc#examples-local-datetime[`LOCAL DATETIME`] +* xref:values-and-types/temporal.adoc#examples-zoned-datetime[`ZONED DATETIME`] +* xref:values-and-types/temporal.adoc#examples-truncate[Truncating temporal values] -.Query +[[examples-date]] +==== `DATE` + +To work with `DATE` values, including creating, parsing, and extracting components, use the xref:functions/temporal/index.adoc#functions-date[`date()`] function. + +.`DATE` +====== + +.Create a `DATE` property value [source, cypher] ---- -RETURN datetime('2015-06-24T12:50:35.556+0100') AS theDateTime +CREATE (n:Label) +SET n.date = date("2025-02-18") +RETURN n.date AS date, valueType(n.date) AS temporalValueType ---- .Result -[role="queryresult",options="header,footer",cols="1*