| AppCtrlScript | |
| Help |
|
Applies to |
AppCtrlScript (Module: wmACScr1.dll) |
|
Group |
String |
|
See also |
GETDURATION |
Calculates the difference in hours, minutes or seconds between two given date value strings.
Note: If you choose to return minutes or hours then remaining seconds will be cut off. You will always get integer variables.
GETDATEDIFF <VariableName>, <Date1>, <Date2>, <Unit>
|
Part |
Description | |
| <VariableName> | Name of the script variable where to store the result. | |
| <Date1>, <Date2> | Dates to compare. | |
| <Unit> |
S{S} | M{M} | H{H}; according to the number of characters you specify the returned value will contain the appropriate number of leading zeros. | |
|
| ||
GETDATEDIFF DateDiff, "2001-02-22 12:00:00", "2001-02-22 12:01:30", "MMM"
'The DateDiff script variable will contain "001".
GETDATEDIFF DateDiff, "2001-02-22 12:00:00", "2001-02-22 12:01:30", "SSS"
'The DateDiff script variable will contain "090" afterwards.