<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: %Date% in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305677#M4854</link>
    <description>The line:&lt;BR /&gt;for /f "tokens=2,3,4 delims=/ " %%i in ('echo %date%') do (&lt;BR /&gt;&lt;BR /&gt;does the following:&lt;BR /&gt;first the FOR statement looks at the delimiters '/' and ' ' (space)  We have to take the output from the date command or variable and break it into usable chunks.&lt;BR /&gt;Tue 06/15/2004 is how the date displays.  If we use a space as a delimiter, we can break off 'Tue' as one entry, then using the '/', break out '06' '15' and '2004'.  Tokens refers to the position to start collecting the pieces from.  In this case, we don't want 'Tue', so we start at the second position and take the three date parts (2,3,4) for month, day, year.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
    <pubDate>Tue, 15 Jun 2004 11:17:19 GMT</pubDate>
    <dc:creator>Jon Finley</dc:creator>
    <dc:date>2004-06-15T11:17:19Z</dc:date>
    <item>
      <title>%Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305671#M4848</link>
      <description>Hi I'm trying to write a batch file that will give me today's date not the day itself. (i.e. 061504) Thanks. Monty.</description>
      <pubDate>Tue, 15 Jun 2004 10:31:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305671#M4848</guid>
      <dc:creator>Monty Lovell</dc:creator>
      <dc:date>2004-06-15T10:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: %Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305672#M4849</link>
      <description>check this out..&lt;BR /&gt;&lt;BR /&gt;for /f "tokens=2,3,4 delims=/ " %%i in ('date /t') do (&lt;BR /&gt;set year=%%k&lt;BR /&gt;set month=%%i&lt;BR /&gt;set day=%%j&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;echo %month%%day%%year%&lt;BR /&gt;&lt;BR /&gt;Ganesh</description>
      <pubDate>Tue, 15 Jun 2004 10:44:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305672#M4849</guid>
      <dc:creator>Ganesh Babu</dc:creator>
      <dc:date>2004-06-15T10:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: %Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305673#M4850</link>
      <description>Thanks Ganesh. I was wondering if you could help me place that syn. within this batch file. I'm trying to get a .zip file made with todays date in it. Here's what I have so far:&lt;BR /&gt;cd\&lt;BR /&gt;cd c:\Program Files\Winzip&lt;BR /&gt;wzzip c:\backup\c%Date%.zip -r -p -t c:\Extra\*.*&lt;BR /&gt;&lt;BR /&gt;So are you saying token should take the place of %date%&lt;BR /&gt;&lt;BR /&gt;Thanks Again for your help in this.&lt;BR /&gt;Monty.</description>
      <pubDate>Tue, 15 Jun 2004 11:00:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305673#M4850</guid>
      <dc:creator>Monty Lovell</dc:creator>
      <dc:date>2004-06-15T11:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: %Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305674#M4851</link>
      <description>Hi,&lt;BR /&gt; What i have posted earlier is how to pharse the date, month and year from the date and use it in the format u needed...&lt;BR /&gt;&lt;BR /&gt;for your requirement it can be as follows..&lt;BR /&gt;&lt;BR /&gt;cd\&lt;BR /&gt;cd c:\Program Files\Winzip&lt;BR /&gt;&lt;BR /&gt;for /f "tokens=2,3,4 delims=/ " %%i in ('date /t') do (&lt;BR /&gt;set year=%%k&lt;BR /&gt;set month=%%i&lt;BR /&gt;set day=%%j&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;wzzip c:\backup\c%month%%day%%year%&lt;BR /&gt;.zip -r -p -t c:\Extra\*.*&lt;BR /&gt;&lt;BR /&gt;Hope this helps..&lt;BR /&gt;&lt;BR /&gt;Ganesh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note:- Since u r new forums user.. u should also know about the point system..&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Jun 2004 11:08:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305674#M4851</guid>
      <dc:creator>Ganesh Babu</dc:creator>
      <dc:date>2004-06-15T11:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: %Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305675#M4852</link>
      <description>Hey! ..... that's MY code!   :-)&lt;BR /&gt;&lt;BR /&gt;If you're running 2000 or XP you can also use the internal variable %date% or %time% in your batch file.&lt;BR /&gt;&lt;BR /&gt;for /f "tokens=2,3,4 delims=/ " %%i in ('echo %Date%') do (&lt;BR /&gt;set year=%%k&lt;BR /&gt;set month=%%i&lt;BR /&gt;set day=%%j&lt;BR /&gt;)&lt;BR /&gt;set tday=%month%%day%%year%&lt;BR /&gt;&lt;BR /&gt;for /f "tokens=1,2,3 delims=:." %%i in ('echo %time%') do (&lt;BR /&gt;set hr=%%i&lt;BR /&gt;set min=%%j&lt;BR /&gt;set sec=%%k&lt;BR /&gt;)&lt;BR /&gt;set rnow=%hr%%min%%sec%&lt;BR /&gt;&lt;BR /&gt;set outfile=mydata_%tday%_%rnow%.log&lt;BR /&gt;&lt;BR /&gt;echo This is a log entry. &amp;gt;&amp;gt; %outfile%&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;echo Log entry created on %tday% at %rnow% &amp;gt;&amp;gt; mylogfile.log&lt;BR /&gt;&lt;BR /&gt;Otherwise you have to use the date/t and time/t entries.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Tue, 15 Jun 2004 11:09:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305675#M4852</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2004-06-15T11:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: %Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305676#M4853</link>
      <description>Hi Jon,&lt;BR /&gt;  I learnt about this statement from one of my senior administator before 2 yrs.. may be it is a kind of code known to many of the admins.&lt;BR /&gt;&lt;BR /&gt;Ganesh</description>
      <pubDate>Tue, 15 Jun 2004 11:13:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305676#M4853</guid>
      <dc:creator>Ganesh Babu</dc:creator>
      <dc:date>2004-06-15T11:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: %Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305677#M4854</link>
      <description>The line:&lt;BR /&gt;for /f "tokens=2,3,4 delims=/ " %%i in ('echo %date%') do (&lt;BR /&gt;&lt;BR /&gt;does the following:&lt;BR /&gt;first the FOR statement looks at the delimiters '/' and ' ' (space)  We have to take the output from the date command or variable and break it into usable chunks.&lt;BR /&gt;Tue 06/15/2004 is how the date displays.  If we use a space as a delimiter, we can break off 'Tue' as one entry, then using the '/', break out '06' '15' and '2004'.  Tokens refers to the position to start collecting the pieces from.  In this case, we don't want 'Tue', so we start at the second position and take the three date parts (2,3,4) for month, day, year.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Tue, 15 Jun 2004 11:17:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305677#M4854</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2004-06-15T11:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: %Date%</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305678#M4855</link>
      <description>Thanks guys you ROCK!!! =)</description>
      <pubDate>Tue, 15 Jun 2004 12:52:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/date/m-p/3305678#M4855</guid>
      <dc:creator>Monty Lovell</dc:creator>
      <dc:date>2004-06-15T12:52:48Z</dc:date>
    </item>
  </channel>
</rss>

