<?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: add day to format date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806541#M317792</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/406226"&gt;@dexcort2020&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;If it is already a date, then this does it:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;2022 var mmddyy10.;
var = intnx('month',var,0,'e');&lt;/LI-CODE&gt;
&lt;P&gt;If it is a string, do this:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;numdate = intnx('month',input(chardate,yymmn6.),0,'e');
2022 numdate mmddyy10.;&lt;/LI-CODE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;2022 is not a valid SAS statement.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 15:22:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-04-07T15:22:02Z</dc:date>
    <item>
      <title>add day to format date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806467#M317742</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have date format&amp;nbsp;yymmn6. I want to change it to&amp;nbsp;MMDDYY10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;by adding the last day of the month&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have : 198605&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want&amp;nbsp;05/31/1986&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 10:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806467#M317742</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-04-07T10:50:50Z</dc:date>
    </item>
    <item>
      <title>change date format yymmn6. to MMDDYY10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806465#M317759</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have date format&amp;nbsp;yymmn6. I want to change it to&amp;nbsp;MMDDYY10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;by adding the last day of the month&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have : 198605&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want&amp;nbsp;05/31/1986&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 10:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806465#M317759</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-04-07T10:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: add day to format date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806469#M317743</link>
      <description>&lt;P&gt;Is the variable in question already a SAS date with a format of YYMMN6., or is it a character variable containing the string?&lt;/P&gt;
&lt;P&gt;If it is already a date, then this does it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format var mmddyy10.;
var = intnx('month',var,0,'e');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If it is a string, do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;numdate = intnx('month',input(chardate,yymmn6.),0,'e');
format numdate mmddyy10.;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Apr 2022 10:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806469#M317743</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-07T10:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: change date format yymmn6. to MMDDYY10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806474#M317760</link>
      <description>&lt;P&gt;DUPLICATE THREAD&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Do not reply here&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Reply at&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806467#M317742" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806467#M317742&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 11:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806474#M317760</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-07T11:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: change date format yymmn6. to MMDDYY10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806496#M317761</link>
      <description>&lt;P&gt;I merged this back into the original question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4327"&gt;@sasphd&lt;/a&gt;&amp;nbsp;please do not double-post.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 12:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806496#M317761</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-07T12:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: add day to format date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806512#M317772</link>
      <description>&lt;P&gt;If it is already a date, then this does it:&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;2022 var mmddyy10.;
var = intnx('month',var,0,'e');&lt;/LI-CODE&gt;&lt;P&gt;If it is a string, do this:&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;numdate = intnx('month',input(chardate,yymmn6.),0,'e');
2022 numdate mmddyy10.;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 07 Apr 2022 13:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806512#M317772</guid>
      <dc:creator>dexcort2020</dc:creator>
      <dc:date>2022-04-07T13:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: add day to format date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806541#M317792</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/406226"&gt;@dexcort2020&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;If it is already a date, then this does it:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;2022 var mmddyy10.;
var = intnx('month',var,0,'e');&lt;/LI-CODE&gt;
&lt;P&gt;If it is a string, do this:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;numdate = intnx('month',input(chardate,yymmn6.),0,'e');
2022 numdate mmddyy10.;&lt;/LI-CODE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;2022 is not a valid SAS statement.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806541#M317792</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-07T15:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: add day to format date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806560#M317808</link>
      <description>&lt;P&gt;Please reconsider which of the posts you mark as a solution. My correction of&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/406226"&gt;@dexcort2020&lt;/a&gt;&amp;nbsp;'s post is not a solution for your initial question.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 16:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806560#M317808</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-07T16:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: add day to format date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806596#M317825</link>
      <description>&lt;P&gt;And if the original variable is numeric with values like 202,201 which humans might see as meaning January 2022 then you need add another layer to the function call sandwich.&lt;/P&gt;
&lt;P&gt;So pick the proper second statement based on whether VAR is&lt;/P&gt;
&lt;P&gt;1) date valued numeric&lt;/P&gt;
&lt;P&gt;2) character&lt;/P&gt;
&lt;P&gt;3) regular integer valued numeric.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format want mmddyy10.;
want = intnx('month',var,0,'e');
want = intnx('month',input(var,yymmn6.),0,'e');
want = intnx('month',input(put(var,z6.),yymmn6.),0,'e');
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Apr 2022 17:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/add-day-to-format-date/m-p/806596#M317825</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-07T17:26:36Z</dc:date>
    </item>
  </channel>
</rss>

