What is datecmd?
Incredibly, a simple and default command to print date and time in a desired format for the windows command prompt does not exists.
Realdate is a simple alternative to that, but it does not run on 64 bit machines. It was wrote in assembly, a complex language to extend such a tool (for me).
The 64 bit architecture is currently too common and the datecmd command was created for such demand.
Differences between datecmd and realdate
- There are no CMOS date/hour switch /c
- There are no /s switch too. You can use the desired format with /f. Eg: /f “Date/Time prefix: %Y”.
- The format for /f is the ISO-C Standard of 1990 for the strftime function
- Was written in C and builded with Visual C++ 2008
- It is a little bit bigger
How to use?
datecmd [/f | /d | /t] /e /?] /f - format string (like strftime C function) /d - date only = /f="%Y%m%d" /t - time only = /f="%H%M%S" /e - add CR/LF (default: no EOL if /d, /t or /f specified) /? - display this help defaults: /f="%Y.%m.%d %H:%M:%S"
I found a bug. How to proceed?
Please provide the steps for reproduce the error or sugest a patch in GitHub.