Skip to content

Commit 1a32dd3

Browse files
Add timestamp() to functions overview page (#1255)
1 parent ef104e1 commit 1a32dd3

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

modules/ROOT/pages/functions/index.adoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,10 @@ Replaced by xref:functions/scalar.adoc#functions-elementid[`elementId()`].
445445
| `startNode(input :: RELATIONSHIP) :: NODE`
446446
| Returns the start `NODE` of a `RELATIONSHIP`.
447447

448+
1.1+| xref::functions/scalar.adoc#functions-timestamp[`timestamp()`]
449+
| `timestamp() :: INTEGER`
450+
| Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
451+
448452
1.1+| xref::functions/scalar.adoc#functions-toboolean[`toBoolean()`]
449453
| `toBoolean(input :: BOOLEAN \| STRING \| INTEGER) :: BOOLEAN`
450454
| Converts a `BOOLEAN`, `STRING`, or an `INTEGER` value to a `BOOLEAN` value.
@@ -648,12 +652,12 @@ Values of the xref::values-and-types/temporal.adoc[temporal types] -- `DATE`, `Z
648652
| `datetime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED DATETIME`
649653
| Creates a `ZONED DATETIME` instant.
650654

651-
1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromepoch()`]
652-
| `datetime.fromepoch(seconds :: INTEGER \| FLOAT, nanoseconds :: INTEGER \| FLOAT) :: ZONED DATETIME`
655+
1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromEpoch()`]
656+
| `datetime.fromEpoch(seconds :: INTEGER \| FLOAT, nanoseconds :: INTEGER \| FLOAT) :: ZONED DATETIME`
653657
| Creates a `ZONED DATETIME` given the seconds and nanoseconds since the start of the epoch.
654658

655-
1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromepochmillis()`]
656-
| `datetime.fromepochmillis(milliseconds :: INTEGER \| FLOAT) :: ZONED DATETIME`
659+
1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromEpochMillis()`]
660+
| `datetime.fromEpochMillis(milliseconds :: INTEGER \| FLOAT) :: ZONED DATETIME`
657661
| Creates a `ZONED DATETIME` given the milliseconds since the start of the epoch.
658662

659663
1.1+| xref::functions/temporal/index.adoc#functions-datetime-realtime[`datetime.realtime()`]

modules/ROOT/pages/functions/scalar.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -855,14 +855,12 @@ RETURN startNode(r)
855855
.Details
856856
|===
857857
| *Syntax* 3+| `timestamp()`
858-
| *Description* 3+| Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
858+
| *Description* 3+| Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
859859
| *Returns* 3+| `INTEGER`
860860
|===
861861

862862
[NOTE]
863-
====
864-
It is the equivalent of `datetime().epochMillis`.
865-
====
863+
xref:functions/temporal/index.adoc#functions-datetime-fromepochmillis[`datetime.fromEpochMillis()`] is a functional equivalent to `timestamp()`.
866864

867865
.Considerations
868866
|===

modules/ROOT/pages/functions/temporal/index.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ RETURN datetime({epochMillis: 424797300000}) AS theDate
13181318

13191319
.Details
13201320
|===
1321-
| *Syntax* 3+| `datetime.fromepoch(seconds, nanoseconds)`
1321+
| *Syntax* 3+| `datetime.fromEpoch(seconds, nanoseconds)`
13221322
| *Description* 3+| Creates a `ZONED DATETIME` given the seconds and nanoseconds since the start of the epoch.
13231323
.3+| *Arguments* | *Name* | *Type* | *Description*
13241324
| `seconds` | `INTEGER \| FLOAT` | The number of seconds from the UNIX epoch in the UTC timezone.
@@ -1354,7 +1354,7 @@ RETURN dateTimeFromEpoch
13541354

13551355
.Details
13561356
|===
1357-
| *Syntax* 3+| `datetime.fromepochmillis(milliseconds)`
1357+
| *Syntax* 3+| `datetime.fromEpochMillis(milliseconds)`
13581358
| *Description* 3+| Creates a `ZONED DATETIME` given the milliseconds since the start of the epoch.
13591359
.2+| *Arguments* | *Name* | *Type* | *Description*
13601360
| `milliseconds` | `INTEGER \| FLOAT` | The number of milliseconds from the UNIX epoch in the UTC timezone.

0 commit comments

Comments
 (0)