Oihana PHP Arango

dateISO8601.php

Table of Contents

Functions

dateISO8601()  : string
Converts a given date to an ISO 8601 formatted string.

Functions

dateISO8601()

Converts a given date to an ISO 8601 formatted string.

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

Constructs an AQL expression in the format:

DATE_ISO8601(date)

where date can be a numeric timestamp or an ISO 8601 date-time string.

The return value is a string in ISO 8601 format.

Parameters
$date : int|string|null = null

A numeric timestamp or ISO 8601 date string. If null, uses DATE_NOW().

Tags
example
echo dateISO8601('2025-10-08T12:34:56Z');
// Produces: DATE_ISO8601("2025-10-08T12:34:56Z")

echo dateISO8601();
// Produces: DATE_ISO8601(DATE_NOW())
see
https://docs.arangodb.com/stable/aql/functions/date/#date_iso8601
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL expression returning the ISO 8601 date string.

On this page

Search results