DDIFF

This function determines the number of intervals between two dates..

DDIFF(Interval , Date1 , Date2)


PARAMETERS

Interval

Required. String expression that is the interval you want to add. The following table shows the possible values of the interval parameter.

yyyy = Year
q = Quarter
m = Month
y = Day of year
d = Day
w = Weekday
ww = week of year
h = Hour
m = Minute
s = Second

Date1

The 1st date you want to use.

Date2

The 2nd date you want to use in this calculation

Example:
Store the total number of years elapsed between the current date and the date contained in the textbox with TAG name of BirthDate.  Store the value in a textbox with TAG name of AGE.

SETVALUE(~AGE~//DDIFF("yyyy",~BirthDate~,Date()))