DateDiffYears

Description

Returns the number of years between the end_datetime and the start_datetime.

Syntax

DateDiffYears(end_datetime, start_datetime)

Arguments

  end_datetime - string expression in ISO 8601 format. 

  start_datetime - string expression in ISO 8601 format.

Examples

DateDiffYears('2009-01-07T01:07:01.000Z','2008-02-01T00:00:00.000Z') returns 0

Notes

end_datetime and start_datetime must be in ISO 8601 date time format, otherwise the job will fail. See Using ISO 8601 date/time functions.

Return value datatype

Long

Impact of null value

If any (or all) inputs are null, returns null.