Datetime Diff
Returns the difference between two dates (with positive and negative), i.e., date1 minus date2.
【date1】Date 1
【date2】Date 2
【units】is the time unit, i.e., the unit for calculating the difference between date1 and date2. For example, calculating by "days" can also be converted to calculating by "years".
Time units include the following symbols, both formats can be used: "Unit Description" → "Abbreviation"
Milliseconds: "milliseconds" → "ms"
Seconds: "seconds" → "s"
Minutes: "minutes" → "m"
Hours: "hours" → "h"
Days: "days" → "d"
Weeks: "weeks" → "w"
Months: "months" → "M"
Quarters: "quarters" → "Q"
Years: "years" → "y"
Click the link below to view all time units.