<?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 to number in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378992#M91165</link>
    <description>&lt;P&gt;I'm guessing that record date is character, and that snapshot date could be character as well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length snapshot $ 6;&lt;/P&gt;
&lt;P&gt;snapshot = scan(RecordDate, 3, '.') || scan(RecordDate, 2, '.');&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 13:29:24 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-07-25T13:29:24Z</dc:date>
    <item>
      <title>Date to number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378976#M91155</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am facing&amp;nbsp;to this problem.&lt;/P&gt;&lt;P&gt;I have this&lt;/P&gt;&lt;P&gt;&lt;IMG title="Snímka.PNG" alt="Snímka.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/10505i143739264187439F/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;and I wanna converted to this format&lt;/P&gt;&lt;P&gt;&lt;IMG title="Snímka.PNG" alt="Snímka.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/10506i135C6EB8825361D7/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;Has anybody know how to solve this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378976#M91155</guid>
      <dc:creator>jopo12345678</dc:creator>
      <dc:date>2017-07-25T13:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Date to number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378979#M91157</link>
      <description>&lt;P&gt;Is record date a numeric date? &amp;nbsp;If so then just format it:&lt;/P&gt;
&lt;PRE&gt;format recorddate yymmn6.;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:20:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378979#M91157</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-25T13:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date to number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378990#M91163</link>
      <description>&lt;P&gt;It works but it doesnt change to numeric format as need it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Snímka.PNG" alt="Snímka.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/10507i93D9C0B41699A3C4/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378990#M91163</guid>
      <dc:creator>jopo12345678</dc:creator>
      <dc:date>2017-07-25T13:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Date to number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378992#M91165</link>
      <description>&lt;P&gt;I'm guessing that record date is character, and that snapshot date could be character as well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length snapshot $ 6;&lt;/P&gt;
&lt;P&gt;snapshot = scan(RecordDate, 3, '.') || scan(RecordDate, 2, '.');&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378992#M91165</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-25T13:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date to number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378996#M91168</link>
      <description>&lt;P&gt;How are we supposed to tell what values you have or want from photographs of your screen?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How is the variable RecordDate defined? &amp;nbsp;Is it a character? Or a date variable with format like DDMMYYp10. attached to it so that it displays in DMY order with periods between the parts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you want the SNAPSHOT variable defined? Do you want a character string? Do you want a date value with a format like YYMMN6. attached to it so it display with four digit year and two digit month and nothing between the parts? &amp;nbsp;Or perhaps you want to make SNAPSHOT as just a numeric variable and not a date at all, just a number where you have put the month of the year into the ones and tens place and the calendar year into the higher place digits?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/378996#M91168</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-25T13:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date to number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/379005#M91172</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/152644"&gt;@jopo12345678&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;It works but it doesnt change to numeric format as need it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10507i93D9C0B41699A3C4/image-size/original?v=1.0&amp;amp;px=-1" alt="Snímka.PNG" title="Snímka.PNG" border="0" /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The "calendar" icon beside the variable name clearly tells us that this is a numeric variable.&lt;/P&gt;
&lt;P&gt;If you want to get the &lt;EM&gt;integer number&lt;/EM&gt; 201401 (which is basically useless for any type of computation), you need to do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;recorddate = input(put(recorddate,yymmn6.),6.);
format recorddate 6.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-to-number/m-p/379005#M91172</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-25T13:54:57Z</dc:date>
    </item>
  </channel>
</rss>

