Purpose:
Returns the difference between two dates in days as string.
Composition of the format string: this is a normal string into which placeholders can be embedded.
Place holder | Description |
---|---|
%y | Number of years |
%<n>y | Years to <n> digits |
$y | String "Years" |
%m | Number of months |
%<n>m | Months to <n> digits |
$m | String "month" or "months" |
%w | Number of weeks |
%<n>w | Weeks to <n> digits |
$w | String "week" or "weeks" |
%d | Number of days |
%<n>d | Days to <n> digits |
$d | String "day" or "days" |
%h | Number of hours |
%<n>h | Hours to <n> digits |
$h | String "hour" or "hours" |
%i | Number of minutes |
%<n>i | Minutes to <n> digits |
$i | String "minute" or "minutes" |
%s | Number of seconds |
%<n>s | Seconds to <n> digits |
%.<n>s | Seconds with <n> decimals |
$s | String "second" or "seconds" |
Parameter:
Date First date value
Date Second date value
String (optional) Format
Return value:
String
Example:
DateDiff$(Date("01/01/2015"),Date("03/01/2015")) Result: 2 Months