<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Tech-Recipes - Latest Comments in Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><language>en</language><lastBuildDate>Thu, 04 Jun 2009 10:06:36 -0000</lastBuildDate><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-10482916</link><description>Thanks guys... I really didn't have time to figure this out myself&lt;br&gt;I was going to recreate xset32 for win64 in c++ or PERL, but this is much easier.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dan</dc:creator><pubDate>Thu, 04 Jun 2009 10:06:36 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-10146094</link><description>Here's what I use.  It queries the registry first to figure out what format the date is going to be returned in.  It currently supports UK and US locales (as that's all I need to support at the moment).  Trivial to extend it to support others.&lt;br&gt;&lt;br&gt;@echo off&lt;br&gt;goto test&lt;br&gt;&lt;br&gt;:get_date_yyyymmdd&lt;br&gt;    setlocal enableextensions enabledelayedexpansion&lt;br&gt;    set _RV=&lt;br&gt;    set _ERR=0&lt;br&gt;    set _CMD=reg query "HKCU\Control Panel\International" /v sShortDate&lt;br&gt;    for /f "usebackq skip=2 tokens=3,* delims= " %%i in (`%_CMD%`) do (&lt;br&gt;        rem Amsterdam/Houston servers:&lt;br&gt;        rem     Short date format (%%i):    M/d/yyyy&lt;br&gt;        rem     Sample %DATE%:              Thu 05/29/2009&lt;br&gt;        rem London servers:&lt;br&gt;        rem     Short date format (%%i):    dd/MM/yyyy&lt;br&gt;        rem     Sample %DATE%:              29/05/2009&lt;br&gt;        set D=!DATE!&lt;br&gt;        echo i: %%i&lt;br&gt;        echo D: !D!&lt;br&gt;        if "%%i"=="M/d/yyyy" (&lt;br&gt;            rem I'm assuming the day abbreviation will always be three chars&lt;br&gt;            rem (so we account for four in total, including the space).  So&lt;br&gt;            rem far, I can attest that this is definitely the case on Wed &amp;&lt;br&gt;            rem Thu ;-)&lt;br&gt;            set yyyy=!D:~-4!&lt;br&gt;            set mm=!D:~-10,-8!&lt;br&gt;            set dd=!D:~-7,-5!&lt;br&gt;        ) else if "%%i"=="dd/MM/yyyy" (&lt;br&gt;            set yyyy=!D:~-4!&lt;br&gt;            set mm=!D:~-7,-5!&lt;br&gt;            set dd=!D:~-10,-8!&lt;br&gt;        ) else (&lt;br&gt;            echo fatal: I don't understand this system's date format (%%i^)&lt;br&gt;            set _ERR=1&lt;br&gt;        )&lt;br&gt;    )&lt;br&gt;    set _RETVAL=!yyyy!!mm!!dd!&lt;br&gt;    endlocal &amp; set _YYYYMMDD=%_RETVAL% &amp; set _ERROR=%_ERR%&lt;br&gt;    exit /b %_ERROR%&lt;br&gt;&lt;br&gt;:test&lt;br&gt;call :get_date_yyyymmdd&lt;br&gt;echo formatted date: %_YYYYMMDD%</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Trent Nelson</dc:creator><pubDate>Thu, 28 May 2009 07:03:21 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-9958036</link><description>I had been using a method similar to yours but recently I found one that is even simpler:&lt;br&gt;&lt;br&gt;The %DATE% AND %TIME% variables contain the formated date and time so you an just extract the substrings using regular variable syntax&lt;br&gt;&lt;br&gt;set _DATETIME=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%&lt;br&gt;&lt;br&gt;In my case&lt;br&gt;&lt;br&gt;%DATE% contains "Tue 05/26/2009"&lt;br&gt;so %DATE:~10,4% means to extract a substring 4 characters long starting from character 10 &lt;br&gt;&lt;br&gt;If you weren't aware of that way of handling substrings for any variables, now you know.&lt;br&gt;&lt;br&gt;If you have a different default date format than mine you will have to adapt the parameters</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rarsa</dc:creator><pubDate>Tue, 26 May 2009 13:04:11 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-9535657</link><description>Or you can use %date% and parse it later in your script.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">FP</dc:creator><pubDate>Tue, 19 May 2009 10:28:00 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-8688247</link><description>how can i combine the date and time to create a file name.  please advise&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;echo %date:~10,4%%date:~7,2%%date:~4,2%&lt;br&gt;&lt;br&gt;ren d:\temp\log.pdf Survey%date:~10,4%%date:~7,2%%date:~4,2%.pdf&lt;br&gt;&lt;br&gt;&lt;br&gt;pause&lt;br&gt;&lt;br&gt;for /f "tokens=1-5 delims=:" %%d in ("%time%") do rename "hope.pdf" %%d-%%e.pdf&lt;br&gt;pause</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lubuag</dc:creator><pubDate>Sat, 25 Apr 2009 14:12:14 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-8684680</link><description>Okey&lt;br&gt;that helps</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Fuad</dc:creator><pubDate>Sat, 25 Apr 2009 10:22:11 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-8505529</link><description>Many thanks.  I started to write my own then quickly remembered writing bat files requires a fine mix of science and art with a dash of experence.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris Felpel</dc:creator><pubDate>Tue, 21 Apr 2009 15:36:43 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-8294598</link><description>For programmers in the USA, use THIS script instead, otherwise it won't work with the standard Windows US MM/DD/YYYY format.&lt;br&gt;&lt;br&gt;@Echo Off&lt;br&gt;Set YYYY-MM-DD=%DATE:~6,4%-%DATE:~0,2%-%DATE:~3,2%</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Some User</dc:creator><pubDate>Fri, 17 Apr 2009 10:27:07 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-7339317</link><description>genius!, simple, elegant! thanks!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mike</dc:creator><pubDate>Thu, 19 Mar 2009 08:15:11 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-6699960</link><description>not the best at this yet dont even realy know what half what i posted mean but i just got it working with the Filename_"%PDATE%". if you dont want a gap inbetween file and date do Filename"%PDATE%".  hope it helps.&lt;br&gt;&lt;br&gt;FOR /F "TOKENS=1,2 DELIMS=/ " %%A IN ('DATE /T') DO SET mm=%%B&lt;br&gt;FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('DATE /T') DO SET dd=%%B&lt;br&gt;FOR /F "TOKENS=3* DELIMS=/ " %%A IN ('DATE /T') DO SET yyyy=%%B&lt;br&gt;&lt;br&gt;set /A dd=%dd%&lt;br&gt;&lt;br&gt;set Pdate=%yyyy%_%mm%_%dd%&lt;br&gt;echo %Pdate%&lt;br&gt;&lt;br&gt;mkdir C:\MYFILE_"%PDATE%"\</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">leif</dc:creator><pubDate>Fri, 27 Feb 2009 09:26:51 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-6596175</link><description>how to save file with filename+current date&lt;br&gt;ex : myfile20090210</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rvsdi</dc:creator><pubDate>Wed, 25 Feb 2009 04:45:37 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-6383204</link><description>Perfect, exactly what i wanted, thanks for saving me 2 hours !</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus</dc:creator><pubDate>Wed, 18 Feb 2009 16:27:52 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-6058512</link><description>Ryan, I love it, it is great one line no trickery with files etc. I expanded it further my requirements.&lt;br&gt;&lt;br&gt;echo Get the current date and time in YYYY-MM-DD-HH-MM-SS format&lt;br&gt;SET isodt=%date:~10,4%-%date:~7,2%-%date:~4,2%-%time:~0,2%-%time:~3,2%-%time:~6,2%&lt;br&gt;echo %isodt%&lt;br&gt;&lt;br&gt;Thanks a million</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hersch</dc:creator><pubDate>Fri, 06 Feb 2009 19:37:24 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-5887019</link><description>like my file in E drive - 06022009.DMP  so how can copy this file in CD Drive using Batch file. my batch file is :- &lt;br&gt;@echo off&lt;br&gt;cls&lt;br&gt;echo Copying started at %date% %time%&lt;br&gt;xcopy "E:\%date%.DMP" "C:\Documents and Settings\Hp1\Local Settings\Application Data\Microsoft\CD Burning\BACKUP\*.*" /s /e /h /c /d /i /y &lt;br&gt;xcopy "C:\Documents and Settings\Hp1\Local Settings\Application Data\Microsoft\CD Burning\BACKUP\*.*" "G:\BACKUP\*.*"&lt;br&gt;PAUSE&lt;br&gt;explorer g:</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rakesh Bhangre</dc:creator><pubDate>Fri, 06 Feb 2009 02:31:41 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-5565159</link><description>why not just do this:&lt;br&gt;&lt;br&gt;set mydate=%date:~4,2%%date:~7,2%%date:~10,4%</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ryan</dc:creator><pubDate>Mon, 26 Jan 2009 20:06:33 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-4731464</link><description>Perhaps you should try this&lt;br&gt;&lt;br&gt;:: script for datestring in yyyymmdd format&lt;br&gt;:: XJ Moonen Netherlands&lt;br&gt;&lt;br&gt;&lt;br&gt;for /f "tokens=1,2" %%u in ('date /t') do set d=%%v&lt;br&gt;for /f "tokens=1" %%u in ('time /t') do set t=%%u&lt;br&gt;&lt;br&gt;if "%t:~1,1%"==":" set t=0%t%&lt;br&gt;&lt;br&gt;set datestr=%d:~6,4%%d:~3,2%%d:~0,2%&lt;br&gt;set y=%d:~6,4%&lt;br&gt;set m=%d:~3,2%&lt;br&gt;set d=%d:~0,2%&lt;br&gt;&lt;br&gt;:: test if month &amp;lt; 10 if yes then add a leading zero&lt;br&gt;if /i %m% LSS 10 set m=0%m%&lt;br&gt;&lt;br&gt;:: test if day &amp;lt; 10 if yes then add a leading zero&lt;br&gt;if /i %d% LSS 10 set d=0%d%&lt;br&gt;&lt;br&gt;set ymd=%y%%m%%d%&lt;br&gt;&lt;br&gt;::set the actual timestring ie 2034&lt;br&gt;set timestr=%t:~0,2%%t:~3,2%&lt;br&gt;&lt;br&gt;:: set the filename&lt;br&gt;set fname=Filename%ymd%_%timestr%&lt;br&gt;&lt;br&gt;:: show the filename&lt;br&gt;echo %fname%&lt;br&gt;c:\windows\system32\sleep.exe 10</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">XJ Moonen</dc:creator><pubDate>Mon, 29 Dec 2008 16:15:51 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-4323548</link><description>this does not work</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hi</dc:creator><pubDate>Thu, 11 Dec 2008 00:35:34 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-3247152</link><description>The 2nd line should have: echo %CDATE%&lt;br&gt;instead of: DATE/T</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">TonyCH</dc:creator><pubDate>Thu, 23 Oct 2008 01:03:30 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-2817529</link><description>it works fantastic  bu tmy problem is in format i want the date should be form 1 to 9 will be 01 ,02,03 &amp; 09 like . kindly giv eme the solutions</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pbv kumar</dc:creator><pubDate>Fri, 03 Oct 2008 01:44:57 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-2769586</link><description>i am working on a windows batch script that creates a zip file and adds the date to the file name, this works great for a full backup.  I want to be able to set the initial date that the incremental backup begins, and then count up three days, and append the updated date to the zip file name.&lt;br&gt;&lt;br&gt;This is what i use to create the date:&lt;br&gt;Set DD_MM_YYYY=%DATE:~4,2%_%DATE:~7,2%_%DATE:~10,4%&lt;br&gt;&lt;br&gt;then create file and add it to name as so:&lt;br&gt;7a u -tzip e:backupincremental_%DD_MM_YYYY%.zip&lt;br&gt;&lt;br&gt;I would like to set the initial date for the file on lets say Monday 12_10_2007 then for Tues, Wed, and Thurs, append the file name to something like:&lt;br&gt;incremental_%DD_MM_YYYY%_%Tues%.zip&lt;br&gt;incremental_%DD_MM_YYYY%_%Wed%.zip&lt;br&gt;incremental_%DD_MM_YYYY%_%Thurs%.zip&lt;br&gt;&lt;br&gt;Is it possible to set tues, wed, thurs as variables then script the rename of the file to reflect the new days?&lt;br&gt;&lt;br&gt;I guess I'm too new at this and could use some advice.&lt;br&gt;&lt;br&gt;Thanks,</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 10 Dec 2007 19:31:32 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-2769585</link><description>Try this.&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;for /f &amp;quot;tokens=1,2&amp;quot; %%u in &amp;#40;'date /t'&amp;#41; do set d=%%v&lt;br&gt;for /f &amp;quot;tokens=1&amp;quot; %%u in &amp;#40;'time /t'&amp;#41; do set t=%%u&lt;br&gt;if &amp;quot;%t&amp;#58;~1,1%&amp;quot;==&amp;quot;&amp;#58;&amp;quot; set t=0%t%&lt;br&gt;rem set timestr=%d&amp;#58;~6,4%%d&amp;#58;~3,2%%d&amp;#58;~0,2%%t&amp;#58;~0,2%%t&amp;#58;~3,2%&lt;br&gt;set datestr=%d&amp;#58;~6,4%%d&amp;#58;~0,2%%d&amp;#58;~3,2%&lt;br&gt;set timestr=%t&amp;#58;~0,2%%t&amp;#58;~3,2%&lt;br&gt;&lt;br&gt;@echo %datestr%-%timestr%&lt;br&gt;@echo %datestr%&lt;br&gt;@echo %timestr%&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;SparkByte</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 27 Feb 2007 08:48:45 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-2769584</link><description>Seamonkey 420,&lt;br&gt;&lt;br&gt;I am trying to modify your code so it sets a variable for date in the format YYMMDD with no spaces.  I tried to make the mods, but I just don't have the knowledge nor the time to figure this out.&lt;br&gt;&lt;br&gt;Can you assist?&lt;br&gt;&lt;br&gt;dklock</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 22 Feb 2007 04:26:34 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-2769583</link><description>&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;Subhash wrote:&amp;lt;/h6&amp;gt;Hi,&lt;br&gt;&lt;br&gt;Idea about getting the current date time in required format is good. I wanted to know how to subtract the required days from the current date.&lt;br&gt;&lt;br&gt;Like current date is 11/18/2005&lt;br&gt;required date is 11/15/2005 i.e., subtract 3 days from current date.&lt;br&gt;&lt;br&gt;Then use that date in our script.&amp;lt;/ul&amp;gt;&lt;br&gt;&lt;br&gt;Date Calculation In Batch Files XP/2000:&lt;br&gt;&lt;a href="http://www.tech-recipes.com/batch_file_programming_tips1096.html" rel="nofollow"&gt;http://www.tech-recipes.com/batch_file_programm...&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">davak</dc:creator><pubDate>Fri, 25 Nov 2005 01:51:04 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-2769582</link><description>Hi,&lt;br&gt;&lt;br&gt;You can try the below.  it works in XP.&lt;br&gt;&lt;br&gt;FOR /F "TOKENS=1,2 DELIMS=/ " %%A IN ('DATE /T') DO SET mm=%%B&lt;br&gt;FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('DATE /T') DO SET dd=%%B&lt;br&gt;FOR /F "TOKENS=3* DELIMS=/ " %%A IN ('DATE /T') DO SET yyyy=%%B&lt;br&gt;&lt;br&gt;set /A dd=%dd%-3&lt;br&gt;&lt;br&gt;set Pdate=%mm%/%dd%/%yyyy%&lt;br&gt;echo %Pdate%&lt;br&gt;&lt;br&gt;&lt;br&gt;rgds&lt;br&gt;Mahen</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mahen</dc:creator><pubDate>Thu, 24 Nov 2005 18:48:05 -0000</pubDate></item><item><title>Re: Windows Batch File (.bat) to get current date in MMDDYYYY format. | Computer programming | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/#comment-2769581</link><description>Hi Subhash&lt;br&gt;&lt;br&gt;Getting calculation of date is no easy task.&lt;br&gt;What O/S are you using.&lt;br&gt;   &lt;br&gt;It's inportant because, "echo %Date%" or date /t would produce&lt;br&gt;different results on different O/S and date formats ie.&lt;br&gt;&lt;br&gt;WinXP English Date      01/12/2005&lt;br&gt;WinXP American Date   12/01/2005&lt;br&gt;&lt;br&gt;Win 2000 the same but adds the Weekday Tue 01/08/2005</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 18 Nov 2005 11:25:33 -0000</pubDate></item></channel></rss>