A versatile command-line Windows utility for performing a wide variety of date and time calculations for scripting and automation purposes. Other key functions include comparison of job execution timings, the generation of random numbers, and the generation of important environment variables useful in Windows shell scripting. This utility can support multiple regional settings formats, and provide the display of dates and times in custom formats.
-h .... Display this help message (--?? = extended help)
-i .... Display banner and build information, then exit
-q .... Display resulting value only for any date/time calculations
-o .... Output custom message + resulting date/time calculation
-d .... Use selected date for date/time calculations
-s .... Use selected date for individual date calculation
-f .... Control the formatting of the date output for any date calculation
-b .... Determine number of days between two dates
-p .... Obtain date that is xx days in the past
-a .... Obtain date that is xx days in the future
-u .... Convert days into an approximate "years, months, days" format
-w .... Obtain ordinal day of the week for some date
-y .... Obtain ordinal day of the year for some date
-g .... Obtain ordinal week of the year for some date
-l .... Is supplied date in a leap year?
-m .... Is supplied date the last day in a month?
-c .... Is supplied date the same as today's date?
-r .... Generate random number
-t .... Calculate duration between two times or date/times
-n .... Calculate duration between two times or date/times
-k .... Convert a time duration (plus optional date) into different units of time
-x .... Calculate a prior time (in form of hhh:nn:ss.zzz)
-z .... Calculate a later time (in form of hhh:nn:ss.zzz)
-e .... Control the formatting of the time output
For more details, see:
DATEINFO -??
Tested on Windows XP through 11 (x86 and x64)
Tested on Windows 2003 through 2022 (x86 and x64)
Comments