@echo off
set timestamp=%date:~-4%-%date:~4,2%-%date:~7,2%:%time:~0,2%-%time:~3,2%-%time:~6,2%
echo %timestamp%
set timestamp=%date:~-4%-%date:~4,2%-%date:~7,2%:%time:~0,2%-%time:~3,2%-%time:~6,2%
echo %timestamp%
This blog provides some ready-made tips, tricks, tweaks & interview questions-answers on C, C++, Perl, Shell Scripting and UNIX Commands.