scmuser created the topic: DOS Command to display time without prompting for New time
I think most of us know the DOS command “time/T” which displays current system time without prompting for new time.
But If one needs more granular output, say in HH:MM:SS format, here is a way out, use “echo %TIME%” which expands to current time using same format as TIME command.
There are so many other things which can be echoed. For example, try any of the following variables:
%CD% – expands to the current directory string.
%DATE% – expands to current date using same format as DATE command.
%RANDOM% – expands to a random decimal number between 0 and 32767.
%ERRORLEVEL% – expands to the current ERRORLEVEL value
%CMDEXTVERSION% – expands to the current Command Processor Extensions version number.
%CMDCMDLINE% – expands to the original command line that invoked the Command Processor.
%PATH% – expands the current PATH variable.
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND