@echo off
:: START FILE GetNiceTime.cmd ====================================================
:: HAVING THE FOLLOWING DATE TIME FORMATS time is 21:30:27,47 and date is to 20.05.2010
:: START USAGE ==================================================================
:: SET THE NICETIME
:: SET NICETIME=BOO
:: CALL GetNiceTime.cmd
:: ECHO NICETIME IS %NICETIME%
:: echo nice time is %NICETIME%
:: END USAGE ==================================================================
echo set hhmmsss
:: this is Regional settings dependant so tweak this according your current settings
for /f "tokens=1-3 delims=,: " %%a in ('echo %time%') do set hhmmsss=%%a%%b%%c
:: DEBUG PAUSE
ECHO hhmmsss IS %hhmmsss%
:: DEBUG PAUSE
echo %yyyymmdd%
:: this is Regional settings dependant so tweak this according your current settings
for /f "tokens=2-4 delims=. " %%D in ('echo %DATE%') do set yyyymmdd=%%F%%E%%D
::DEBUG ECHO yyyymmdd IS %yyyymmdd%
:: DEBUG PAUSE
set NICETIME=%yyyymmdd%_%hhmmsss%
:: DEBUG PAUSE
echo THE NICETIME IS %NICETIME%
:: DEBUG PAUSE
:: =========END FILE GetNiceTime.cmd ====================================================
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!