<?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 format in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551249#M8943</link>
    <description>&lt;P&gt;We all have needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have needs too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need you to tell me the names of the variables that you have to work with, and give a couple of examples of the values they contain and the result that you would like.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2019 20:46:44 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2019-04-15T20:46:44Z</dc:date>
    <item>
      <title>Date format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551248#M8942</link>
      <description>&lt;DIV class="mt-info-text"&gt;I need the date in format&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&lt;DIV class="mt-info-text"&gt;I need a variable that saves me the value of the current year and month with the day 2 of each month&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mt-info-text"&gt;AAAAMMDDD&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551248#M8942</guid>
      <dc:creator>yesidgranadosv</dc:creator>
      <dc:date>2019-04-15T20:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551249#M8943</link>
      <description>&lt;P&gt;We all have needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have needs too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need you to tell me the names of the variables that you have to work with, and give a couple of examples of the values they contain and the result that you would like.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551249#M8943</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-04-15T20:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551250#M8944</link>
      <description>&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('Fetch_COM', put(intnx ('month',today(),-2, 'b') + 27 ,yymmddn8.) );&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I HAVE THE VARIABLE "Fetch COM"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SHE GIVES ME AS a RESULT 20190228&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I NEED a VARIABLE TO DELIVER ME AS a RESULT 20190402&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;THE CURRENT DATE WITH DAY 2&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551250#M8944</guid>
      <dc:creator>yesidgranadosv</dc:creator>
      <dc:date>2019-04-15T20:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551252#M8945</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
call symputx('Fetch_COM', put(intnx ('month',today(),0, 'b') + 1 ,yymmddn8.) );
run;

%put &amp;amp;Fetch_COM;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551252#M8945</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-04-15T20:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551253#M8946</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269250"&gt;@yesidgranadosv&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('Fetch_COM', put(intnx ('month',today(),-2, 'b') + 27 ,yymmddn8.) );&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I HAVE THE VARIABLE "Fetch COM"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SHE GIVES ME AS a RESULT 20190228&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I NEED a VARIABLE TO DELIVER ME AS a RESULT 20190402&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;THE CURRENT DATE WITH DAY 2&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think this means you didn't understand the code provided previously.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;27 puts the date at 27+1 =28 days. If you want day 2, change the 27 accordingly to get the date you want.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551253#M8946</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-15T20:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551256#M8947</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269250"&gt;@yesidgranadosv&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('Fetch_COM', put(intnx ('month',today(),-2, 'b') + 27 ,yymmddn8.) );&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I HAVE THE VARIABLE "Fetch COM"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SHE GIVES ME AS a RESULT 20190228&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I NEED a VARIABLE TO DELIVER ME AS a RESULT 20190402&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;THE CURRENT DATE WITH DAY 2&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's not quite correct and please don't type in all upper case, it's the equivalent of yelling.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're creating a macro variable, named Fetch_CON, that is the second day of the current year and month. You do not have a variable with that value nor are you using data from a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TODAY() returns the current date&lt;/P&gt;
&lt;P&gt;INTNX() moves that date to the beginning of the month, since the first parameter is month and the last paramter is 'b' for beginning of the month.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;+1/27 adds the number of days to the month as needed.&lt;/P&gt;
&lt;P&gt;YYMMDDN formats the date to appear in your desired format, although it's still a SAS date underneath. If you're planning to work more with dates and macro variables, I highly recommend reading the date and time tutorials here, you'll save yourself a lot of time:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or more specifically, this PDF file attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 21:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-format/m-p/551256#M8947</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-15T21:10:08Z</dc:date>
    </item>
  </channel>
</rss>

