apoc.temporal.toZonedTemporal

Details

Syntax

apoc.temporal.toZonedTemporal(time [, format, timezone ])

Description

Parses the given date STRING using the specified format into the given time zone.

Arguments

Name

Type

Description

time

STRING

The date string to be parsed.

format

STRING

The format of the given date string. The default is: yyyy-MM-dd HH:mm:ss.

timezone

STRING

The timezone the given string is in. The default is: UTC.

Returns

ZONED DATETIME

Usage Examples

RETURN apoc.temporal.toZonedTemporal('2012-12-23 23:59:59',"yyyy-MM-dd HH:mm:ss") AS output;
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;
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;
Results
output

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