Calculates the number of time steps between two dates
DATEDIF(start date, end date, part)
start date
end date
part
Returns the differences between pairs of dates/times.
Argument
Description
Date/time value(s) corresponding to start date
Date/time value(s) corresponding to end date
Part of the date/time objects to calculate the difference by. Supported parts:
years or year or yrs or yr or Y
years
year
yrs
yr
Y
months or month or mths or mth or M
months
month
mths
mth
M
weeks or week or wks or wk or W
weeks
week
wks
wk
W
days or day or d or D
days
day
d
D
hours or hour or hrs or hr or h
hours
hour
hrs
hr
h
minutes or minute or mins or min or m
minutes
minute
mins
min
m
seconds or second or secs or sec or s
seconds
second
secs
sec
s
ms (milliseconds)
ms
Differences between starting and ending dates/times.
Each difference is a whole number representing full date part differences between the end and start dates/times.
These whole numbers can be positive or negative. Fractional differences are rounded down to the nearest whole number.
Last updated 4 years ago
Was this helpful?