apoc.temporal.toZonedTemporal

Function

apoc.temporal.toZonedTemporal(time STRING, format STRING, timezone STRING) - parses the given date STRING using the specified format into the given time zone.

Signature

apoc.temporal.toZonedTemporal(time :: STRING, format = yyyy-MM-dd HH:mm:ss :: STRING, timezone = UTC :: STRING) :: ZONED DATETIME

Input parameters

Name Type Default

time

STRING

null

format

STRING

yyyy-MM-dd HH:mm:ss

timezone

STRING

UTC

Usage Examples

RETURN apoc.temporal.toZonedTemporal('2012-12-23 23:59:59',"yyyy-MM-dd HH:mm:ss") AS output;
Table 1. Results
output

2012-12-23T23:59:59Z[UTC]

RETURN apoc.temporal.toZonedTemporal('2012-12-23 23:59:59',"yyyy-MM-dd HH:mm:ss", "+04:30") AS output;
Table 2. Results
output

2012-12-24T04:29:59+04:30

RETURN apoc.temporal.toZonedTemporal('2012-12-23 23:59:59',"yyyy-MM-dd HH:mm:ss", "Pacific/Auckland") AS output;
Table 3. Results
output

2012-12-23T23:59:59+13:00[Pacific/Auckland]