<?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: how to fix date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486972#M126802</link>
    <description>&lt;P&gt;Your code would keep lead blanks .&lt;/P&gt;
&lt;P&gt;Like :&amp;nbsp; &amp;nbsp;___20122018&amp;nbsp; .So when you input() it ,your code only read the first 10 characters&amp;nbsp;&lt;SPAN&gt;___201220, that lead to wrong date.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you use put(x,best. -L) would get rid of lead blanks and you would get:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;20122018 and input() will correctly read it .&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Aug 2018 12:50:05 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-08-15T12:50:05Z</dc:date>
    <item>
      <title>how to fix date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486658#M126669</link>
      <description>&lt;P&gt;data s1 ;&lt;BR /&gt;name=22122018 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;BR /&gt;select input(put(name,best.),ddmmyy10.) as date format=ddmmyyd10. from s1 ;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if run above program it gives 22-12-2020 but i want as it is date&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 13:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486658#M126669</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-08-14T13:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486660#M126670</link>
      <description>&lt;P&gt;data s1 ;&lt;BR /&gt;name=22122018 ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql ;&lt;BR /&gt;select input(put(name,best.&lt;STRONG&gt; -l&lt;/STRONG&gt;),ddmmyy10.) as date format=ddmmyyd10. from s1 ;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 13:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486660#M126670</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-08-14T13:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486661#M126671</link>
      <description>what is best. -|&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Aug 2018 13:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486661#M126671</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-08-14T13:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486662#M126672</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/209685"&gt;@thanikondharish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;what is best. -|&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-L left justify.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 13:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486662#M126672</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-08-14T13:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486666#M126674</link>
      <description>how it works could you explain that&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Aug 2018 13:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486666#M126674</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-08-14T13:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486714#M126688</link>
      <description>&lt;P&gt;So you have a 8-digit number that should be a date. Convert it with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date = input(put(name,z8.),ddmmyy8.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The z8. format makes sure that leading zeroes are not dropped.&lt;/P&gt;
&lt;P&gt;What format you assign to the new variable depends on how you want it displayed.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 15:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486714#M126688</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-14T15:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to fix date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486972#M126802</link>
      <description>&lt;P&gt;Your code would keep lead blanks .&lt;/P&gt;
&lt;P&gt;Like :&amp;nbsp; &amp;nbsp;___20122018&amp;nbsp; .So when you input() it ,your code only read the first 10 characters&amp;nbsp;&lt;SPAN&gt;___201220, that lead to wrong date.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you use put(x,best. -L) would get rid of lead blanks and you would get:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;20122018 and input() will correctly read it .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 12:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-fix-date/m-p/486972#M126802</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-08-15T12:50:05Z</dc:date>
    </item>
  </channel>
</rss>

