<?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: Creating date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/554737#M154353</link>
    <description>&lt;P&gt;Are you trying to align dates to the beginning of the year? If so, use the INTNX function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first parameter is the time interval, in this case year.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second is the variable you want to use as a reference&lt;/P&gt;
&lt;P&gt;The third is 0, because you're not changing the year.&lt;/P&gt;
&lt;P&gt;The fourth is the alignment parameter and lets you align the date to the beginning, end, middle or same interval. In this case you seem to want the beginning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Date = intnx('year', date, 0, 'b');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/218252"&gt;@Mirou&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I need to create a new date from an existing date,&lt;/P&gt;
&lt;P&gt;exemple date &lt;FONT color="#333399"&gt;25/09/2016&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;the new one should take 2016 as a year ,1 as month and 1 as a day that means &lt;FONT color="#333399"&gt;01/01/2016.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#333399"&gt;Tnahk you&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2019 15:13:09 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-04-29T15:13:09Z</dc:date>
    <item>
      <title>Creating date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/554730#M154346</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I need to create a new date from an existing date,&lt;/P&gt;&lt;P&gt;exemple date &lt;FONT color="#333399"&gt;25/09/2016&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;the new one should take 2016 as a year ,1 as month and 1 as a day that means &lt;FONT color="#333399"&gt;01/01/2016.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;Tnahk you&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 15:07:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/554730#M154346</guid>
      <dc:creator>Mirou</dc:creator>
      <dc:date>2019-04-29T15:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/554737#M154353</link>
      <description>&lt;P&gt;Are you trying to align dates to the beginning of the year? If so, use the INTNX function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first parameter is the time interval, in this case year.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second is the variable you want to use as a reference&lt;/P&gt;
&lt;P&gt;The third is 0, because you're not changing the year.&lt;/P&gt;
&lt;P&gt;The fourth is the alignment parameter and lets you align the date to the beginning, end, middle or same interval. In this case you seem to want the beginning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Date = intnx('year', date, 0, 'b');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/218252"&gt;@Mirou&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I need to create a new date from an existing date,&lt;/P&gt;
&lt;P&gt;exemple date &lt;FONT color="#333399"&gt;25/09/2016&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;the new one should take 2016 as a year ,1 as month and 1 as a day that means &lt;FONT color="#333399"&gt;01/01/2016.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#333399"&gt;Tnahk you&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 15:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/554737#M154353</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-29T15:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/554754#M154358</link>
      <description>Thank you for your help!</description>
      <pubDate>Mon, 29 Apr 2019 15:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/554754#M154358</guid>
      <dc:creator>Mirou</dc:creator>
      <dc:date>2019-04-29T15:59:28Z</dc:date>
    </item>
  </channel>
</rss>

