get-years-from-date-difference

Calculates the difference between the year part of two given dates and returns the difference.

Syntax

    get-years-from-date-difference(strDate1,strDate2)

Parameters

strDate1 is a string that represents one date to compare and is specified in the format yyyy-mm-dd.

strDate2 is a string that represents the other date to compare and is specified in the format yyyy-mm-dd.

For more information about date and time parameters, see Date and time parameters.

Returns

A number that holds the difference between the year part of the given dates.

Example

The following expression returns a number of value 3:

get-years-from-date-difference('2003-10-30','1999-11-28')

// Ethnio survey code removed