Thursday, February 23, 2012

Windows Dos batch file Date and Time Split


SET currdt=%DATE:~4,2%_%DATE:~7,2%_%DATE:~-4%_%time:~0,2%_%time:~3,2%_%time:~6,2%

SET month=%DATE:~4,2%
SET day=%DATE:~7,2%
SET year=%DATE:~-4%
SET hour=%time:~0,2%
SET sec=%time:~3,2%
SET millis=%time:~6,2%

echo %currdt%
echo %day%
echo %month%
echo %year%
echo %hour%
echo %sec%
echo %millis%

echo %year%_%month%_%day%_%hour%_%sec%_%millis%

The above batch script can extract day, month, year, hour, sec, millisecond.

You can use this in Windows Batch Script for saving files with Date TimeStamp

4 comments:

  1. Gclub online casinos Game Center Online Baccarat In the form of live broadcast, straight from G Club Casino, Poipet, Cambodia Open a full range of casino games such as Baccarat, Insurance, Hi-Lo, Roulette, Tiger, Fantan and online slots. Can join in many fun ways Whether playing in G Club via the webpage Or to play mobile Gclub that supports both Android and iOS systems. We also have services G Club entrance The newest update provides 24-hour deposit and withdrawal services with a professional team. royal online v2Therefore, you can be assured of the speed and safety. Open a new fun experience with us today.

    ReplyDelete
  2. Mr Benjamin went above and beyond their requirements to assist me with my loan which i used expand my pharmacy business,They were friendly, professional, and absolute gems to work with.I will recommend  anyone looking for loan to contact. 247officedept@gmail.com.WhatsApp ... + 19893943740.

    ReplyDelete
  3. Nice article..! Thanks for sharing this amazing article.
    mobile app development company .

    ReplyDelete

  4. This Is Really Useful And Nices Information
    about.me/MilemarkerXFactor

    ReplyDelete