Oihana PHP Arango

dateTimeStamp.php

Table of Contents

Functions

dateTimeStamp()  : string
Converts a given date into a numeric timestamp with millisecond precision.

Functions

dateTimeStamp()

Converts a given date into a numeric timestamp with millisecond precision.

dateTimeStamp([int|string|null $date = null ]) : string

Constructs an AQL expression in the format:

DATE_TIMESTAMP(date)

where date can be a numeric timestamp or an ISO 8601 date string. The result is a numeric timestamp in milliseconds. To obtain seconds, divide the result by 1000.

Parameters
$date : int|string|null = null

Numeric timestamp or ISO 8601 date string. Defaults to DATE_NOW() if null.

Tags
example
echo dateTimeStamp('2025-10-08T12:00:00Z');
// Produces: DATE_TIMESTAMP("2025-10-08T12:00:00Z")

echo dateTimeStamp();
// Produces: DATE_TIMESTAMP(DATE_NOW())
see
https://docs.arangodb.com/devel/aql/functions/date/#date_timestamp
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL expression returning the timestamp.

On this page

Search results