<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How Can I Determine Last Month’s Date?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2006/07/12/how-can-i-determine-last-month-s-date.aspx</link><description>Hey, Scripting Guy! How can I determine last month’s date? I need to be able to take the month and year for the previous month (using the format mmyy ) and create a file name like this: test0606.xls. -- DR 
 Hey, DR. We have to admit that, at first,</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How Can I Determine Last Month’s Date?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2006/07/12/how-can-i-determine-last-month-s-date.aspx#3480448</link><pubDate>Mon, 13 Feb 2012 06:18:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3480448</guid><dc:creator>Gieb</dc:creator><description>&lt;p&gt;&amp;#39; somewhat simpler&lt;/p&gt;
&lt;p&gt;prevMonthDate = DateAdd(&amp;quot;m&amp;quot;,-1,Date)&lt;/p&gt;
&lt;p&gt;intMonth = Month(prevMonthDate)&lt;/p&gt;
&lt;p&gt;intYear = Year(prevMonthDate)&lt;/p&gt;
&lt;p&gt;intYear = Right(intYear, 2)&lt;/p&gt;
&lt;p&gt;strFileName = &amp;quot;test&amp;quot; &amp;amp; LEFT(&amp;quot;0&amp;quot; &amp;amp; intMonth,2) &amp;amp; intYear &amp;amp; &amp;quot;.xls&amp;quot;&lt;/p&gt;
&lt;p&gt;Wscript.Echo strFileName&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3480448" width="1" height="1"&gt;</description></item><item><title>re: How Can I Determine Last Month’s Date?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2006/07/12/how-can-i-determine-last-month-s-date.aspx#3391462</link><pubDate>Thu, 03 Mar 2011 03:25:01 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3391462</guid><dc:creator>helfrich2006@comcast.net</dc:creator><description>&lt;p&gt;For some reason, this actually works. &amp;nbsp;Even if you do a 000&amp;amp;Day(date), you get 2 characters. &amp;nbsp;Go figure.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strDay &amp;nbsp;=0&amp;amp;Day(date)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strMon &amp;nbsp;=0&amp;amp;Month(date)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strYear =mid(Year(date),3,2)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strDate = strDay&amp;amp;strMon&amp;amp;strYear&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3391462" width="1" height="1"&gt;</description></item></channel></rss>