Skip to content.

TalkBMC

Sections
You are here: Home » Blog Archive » Anne Gentle » Exploring Information Design and Development » Didn't seem to work right...!!!

Comment

Above in this comment thread: MS-DOS tips for time and date stamps » help » just a few modifications... 12,4 is key here for the YYYY

Didn't seem to work right...!!!

Posted by MOFO at 2007-05-10 01:24
Messed around with numbers a bit and this seems to work for me..
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set yyyy-mm-dd__hh.mm.ss=%date:~10,4%-%date:~4,2%-%date:~7,2%__%hh%.%time:~3,2%.%time:~6,2%---%date:~-0,3%
MD c:\%yyyy-mm-dd__hh.mm.ss%

Gives me Folder Names like this: 2007-05-09__22.17.28---Wed

So my next question would be:
Is it possible to change the time from 24H time to 12H time and Have it insert AM or PM into the time-stamp so it would look like this:
2007-05-09__12.17.28.AM---Wed
2007-05-09__12.17.28.PM---Wed

2007-05-09__01.17.28.AM---Wed
2007-05-09__01.17.28.PM---Wed
 
 

Powered by Plone

This site conforms to the following standards: