Subtracts one YmdHms variable from another.
TimeSubtract( datetime , datetime - difference)
(s) datetime a datetime using the format of YYYY:MM:DD:HH:MM:SS.
(s) datetime difference a datetime to be subtracted from the original using the same format
(s) a time string in YmdHms format.
Use this function to subtract a specified datetime from an original datetime. TimeSubtract uses normalized conversion so a valid datetime will be returned. "datetime difference" can not be larger than "datetime".
"datetime -difference" is an amount of time to be subtracted from datetime, in YmdHms format.
TimeSubtract is NOT designed to determine the difference between two points in time. For that, use TimeDiffDays, TimeDiffSecs, or the new TimeDiff function
IntControl 41 can be used to control YmdHms format returned by time functions.
; Subtract 1 day from 9/1/98 (at midnight) newtime=TimeSubtract("1998:09:01:00:00:00", "0000:00:01:00:00:00") Message("One day before 09/01/1998", newtime) ; Subtract 48 hours from the current time newtime=TimeSubtract(TimeYmdHms(), "0000:00:00:48:00:00") Message("Two days before today", newtime) Message("TimeSubtract","Time Subtracted.")
TimeAdd, TimeDiffDays, TimeDiffSecs, TimeDiff, IntControl 41