---
title: timestamp
url: https://nexyron.tech/docs/cypher/functions/temporal/timestamp
description: Constructs or returns timestamp values in the Cypher expression surface. It is documented separately because time construction, sequence ordering, window parameters, and as of beha
---

# timestamp

## Generic Description

Constructs or returns timestamp values in the Cypher expression surface. It is documented separately because time construction, sequence ordering, window parameters, and as-of behavior materially change analytical meaning.

Simple example:

```cypher
RETURN timestamp()
```

## Consumer-Level Explanation

Use it when an epoch-style timestamp is the natural interface for surrounding data. Prefer this function when the temporal assumption should be visible to the planner, especially for event streams, freshness checks, and sequence features.

## More Detailed Explanation

`timestamp` belongs to the temporal construction, conversion, or extraction surface. Use it to make time semantics explicit in the query text: whether a value is date-only, time-only, timestamp-like, duration-like, current-time dependent, or bucketed to a chosen calendar unit.

## Advanced Example

This example names the event stream and operational context before applying `timestamp`, which helps planner tooling preserve the intended sequence semantics.

```cypher
MATCH (u:User)-[e:VIEWED]->(d:Document)
TIME e.ts BETWEEN datetime('2025-01-01T00:00:00Z') AND datetime('2025-02-01T00:00:00Z')
WITH u, e, d,
     unpivot(properties(d.metadata)) AS metadata_rows,
     date_trunc('day', e.ts) AS day_bucket,
     timestamp(properties(d).created_at) AS focused_value
RETURN u.user_id, d.title, day_bucket, metadata_rows, focused_value
LIMIT 10
```

## Real Use Cases

-   time-bucketed graph analytics
-   as-of filtering and event-window construction
-   making imported timestamp strings or epoch values typed before comparison

## Real Limitations And Tradeoffs

-   current-time functions are intentionally nondeterministic
-   timezone and local-time choices should be made explicit when results cross systems
-   extractors and truncation functions do not create temporal history; they only transform values already in the row
