Printer Version Table of Contents Project Home Page
.PARAMETER...: /T - Time Override Parameter
.CATEGORY....: parameters
.DISCUSSION..:
You may override Fdate's use of the current time -- for the /A parameter only -- by using the /T parameter. The /T parameter specifies a time of day in the 24-hour format hh:mm:ss (hours:minutes:seconds). Leading zeros in each of the three fields (hh, mm, ss) may be omitted. The seconds field may be omitted; if omitted, it defaults to "00".

Note that the /T parm overrides the time portion of the /A date, but it does NOT override the time portion of the /B date.

If, on January 10, 1992 at 2 pm, you run Fdate this way:

it will produce the absolute minute for January 15, 1992 at 5:12 am.

The most frequent and important use of the /T parm is with the format function (/Ff) to obtain the "absolute" minute of a specific date and time. Once we have the absolute minutes of two different date/times, we can easily obtain the time between them (expressed in days, hours, and minutes) by using Fdate's #dif, #idiv, and #mod functions. (In the EXAMPLES section, see the example that contains FORATIME.BAT.)

It is also possible to use /T in conjunction with the time compare function (/Ftcomp).

.EXAMPLE.....:
@echo ON
cls
rem  Since both /A and /B default to the current date and time,
rem  and since /T parm overrides the time only for the /A parm ...

rem   ... during daytime hours, this will always return LT
Fdate /Ftcomp /T00:00:00
rem   ... during daytime hours, this will always return GT
Fdate /Ftcomp /T23:59:59