SubtractDuration

Description

Returns the result of a datetime_expression minus a duration string expression.

Syntax

SubtractDuration(datetime_expression, duration)

Arguments

  datetime_expression - datetime expression. 

  duration - duration string in ISO 8601 format. See https://en.wikipedia.org/wiki/ISO_8601#Durations

Examples

SubtractDuration(ToDate('2013-09-10T08:02:31.667Z'),'PT3H') returns '2013-09-10T05:02:31.667Z'

Return value datatype

DateTime

Impact of null value

If input is null, returns null.