<?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 conversion from Today() to yymmddN8 format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-conversion-from-Today-to-yymmddN8-format/m-p/490624#M128405</link>
    <description>&lt;P&gt;Is your value actually a numeric 20180827? Then it is not a date to SAS. Currently the largest valid number of days to treat as a date is around 6588970, about 14,000,000 less than your value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If numeric then&lt;/P&gt;
&lt;P&gt;input(put(today(),yymmddn8.),8.)&lt;/P&gt;
&lt;P&gt;if character&amp;nbsp;&lt;/P&gt;
&lt;P&gt;put(today(),yymmddn8.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Aug 2018 21:03:48 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-08-28T21:03:48Z</dc:date>
    <item>
      <title>Date conversion from Today() to yymmddN8 format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-conversion-from-Today-to-yymmddN8-format/m-p/490578#M128377</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Still new to SAS world and certainly very new to date conversion.&lt;/P&gt;&lt;P&gt;The query I'm trying to run, has dates, that has to be changed every day. the date plugged inside the query has to be in yymmddN8 format( eg: 20180827)&lt;/P&gt;&lt;P&gt;can you please let me know how do you convert tSAS today() date to the above said format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I have a condition to verify , if the today is friday, get today date and sunday date also.&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 18:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-conversion-from-Today-to-yymmddN8-format/m-p/490578#M128377</guid>
      <dc:creator>SaraDob</dc:creator>
      <dc:date>2018-08-28T18:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion from Today() to yymmddN8 format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-conversion-from-Today-to-yymmddN8-format/m-p/490580#M128379</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225602"&gt;@SaraDob&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The query I'm trying to run, has dates, that has to be changed every day. the date plugged inside the query has to be in yymmddN8 format( eg: 20180827)&lt;/P&gt;
&lt;P&gt;can you please let me know how do you convert tSAS today() date to the above said format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you need&amp;nbsp;that in a numeric or character variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225602"&gt;@SaraDob&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I have a condition to verify , if the today is friday, get today date and sunday date also.&lt;/P&gt;
&lt;P&gt;Please help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Look at INTNX for this one. WEEKDAY(TODAY()) returns the Weekday number, 1 being Sunday and 7 being Saturday.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you looking for the Sunday after or before the Friday? If before, use a negative interval, if after, use a positive interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What about holidays?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 19:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-conversion-from-Today-to-yymmddN8-format/m-p/490580#M128379</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-28T19:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion from Today() to yymmddN8 format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-conversion-from-Today-to-yymmddN8-format/m-p/490624#M128405</link>
      <description>&lt;P&gt;Is your value actually a numeric 20180827? Then it is not a date to SAS. Currently the largest valid number of days to treat as a date is around 6588970, about 14,000,000 less than your value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If numeric then&lt;/P&gt;
&lt;P&gt;input(put(today(),yymmddn8.),8.)&lt;/P&gt;
&lt;P&gt;if character&amp;nbsp;&lt;/P&gt;
&lt;P&gt;put(today(),yymmddn8.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 21:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-conversion-from-Today-to-yymmddN8-format/m-p/490624#M128405</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-28T21:03:48Z</dc:date>
    </item>
  </channel>
</rss>

