datediff("n", "15:30:40", "14:50:32") = 40 minutos
datediff("h", "15:30:40", "14:50:32") = -1 hora
DateDiff(interval, date1, date2 [,Mindayofweek[, Minweekofyear]])
The DateDiff function syntax has these parts:
Arguments
interval
Required. String expression that is the interval you want to use to calculate the differences between date1 and date2. See Settings section for values.
date1, date2
Required. Date expressions. Two dates you want to use in the calculation.
Mindayofweek
Optional. Constant that specifies the day of the week. If not specified, Sunday is assumed. See Settings section for values.
Minweekofyear
Optional. Constant that specifies the Min week of the year. If not specified, the Min week is assumed to be the week in which January 1 occurs. See Settings section for values.
Settings
The interval argument can have the following values:
Setting Description
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week of year
h Hour
n Minute
s Second