apoc.temporal.toZonedTemporal
Function APOC Core
apoc.temporal.toZonedTemporal('2012-12-23 23:59:59','yyyy-MM-dd HH:mm:ss', 'UTC-hour-offset') parse date string using the specified format to specified timezone
Signature
apoc.temporal.toZonedTemporal(time :: STRING?, format = yyyy-MM-dd HH:mm:ss :: STRING?, timezone = UTC :: STRING?) :: (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;
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;
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;
output |
---|
2012-12-23T23:59:59+13:00[Pacific/Auckland] |