<?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 correct SAS informat for dates of the form YYYYMMDD? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87982#M18775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have dates stored in a numeric variable of the form YYYYMMDD, with no separator between the day month and year parts. An example is 20090629. I wish to store it in a SAS date field. I am using the following line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xPolSD = Input(PolSD,yymmddn8.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but which is giving me an error. I have also tried using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xPolSD = Input(PolSD,yymmdd8.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which also gives an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the correct SAS informat to use in this instance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2013 12:02:05 GMT</pubDate>
    <dc:creator>mediaeval</dc:creator>
    <dc:date>2013-01-28T12:02:05Z</dc:date>
    <item>
      <title>correct SAS informat for dates of the form YYYYMMDD?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87982#M18775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have dates stored in a numeric variable of the form YYYYMMDD, with no separator between the day month and year parts. An example is 20090629. I wish to store it in a SAS date field. I am using the following line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xPolSD = Input(PolSD,yymmddn8.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but which is giving me an error. I have also tried using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xPolSD = Input(PolSD,yymmdd8.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which also gives an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the correct SAS informat to use in this instance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 12:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87982#M18775</guid>
      <dc:creator>mediaeval</dc:creator>
      <dc:date>2013-01-28T12:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: correct SAS informat for dates of the form YYYYMMDD?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87983#M18776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to &lt;EM&gt;put&lt;/EM&gt; your date first, so it becomes a string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 12:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87983#M18776</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-01-28T12:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: correct SAS informat for dates of the form YYYYMMDD?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87984#M18777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As @Linus rightly suggested please convert the numeric value to character and try the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date="20090629";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_date=input(date,yymmdd8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format new_date date9.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 12:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87984#M18777</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-01-28T12:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: correct SAS informat for dates of the form YYYYMMDD?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87985#M18778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are confusing Mediaeval by treating the date as a constant, not as a column&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 13:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87985#M18778</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-01-28T13:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: correct SAS informat for dates of the form YYYYMMDD?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87986#M18779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="119192" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you for your feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope the below code will be more understandable &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input date $;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_date=input(date,yymmdd8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format new_date date9.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;20090629&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 13:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-SAS-informat-for-dates-of-the-form-YYYYMMDD/m-p/87986#M18779</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-01-28T13:19:08Z</dc:date>
    </item>
  </channel>
</rss>

