The %DateDiff meta-SQL function returns an integer representing the difference between two dates in number of days.
Syntax:
%DateDiff(date_from, date_to)
If you would like to know the difference in minutes, you can use %DateTimeDiff
The %DateTimeDiff meta-SQL function returns a time value, representing the difference between two datetimes in minutes
Syntax:
%DateTimeDiff(datetime_from, datetime_to)