Calculate the number of days between two datetimes?
조회 수: 134(최근 30일)
Brendan Hamm 2016년 11월 10일
You can do:
The issue is that the between function returns a calendarDuration and this is measured using variable time-frames like months and years which contain different numbers of days.
Peter Perkins 2016년 11월 15일
between already calculated the difference between those two dates in days:
>> d1 = datetime('yesterday'); d2 = datetime('tomorrow');
Even more explicitly:
If you then want the number 2, use caldays:
Hope this helps.