<?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 read different format Dates from external file using single input statement in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-read-different-format-Dates-from-external-file-using/m-p/130343#M10751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no informat that can correctly guess all possibilities.&amp;nbsp; e.g. does 112010 represent Nov 20, 2010, Jan 1, 2010, or Nov (1), 2010?&amp;nbsp; Regardless, the following may do what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date anydtdte.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format date date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1jan2010&lt;/P&gt;&lt;P&gt;112010&lt;/P&gt;&lt;P&gt;01012010&lt;/P&gt;&lt;P&gt;010110&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Sep 2012 16:20:14 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-09-25T16:20:14Z</dc:date>
    <item>
      <title>How to read different format Dates from external file using single input statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-read-different-format-Dates-from-external-file-using/m-p/130342#M10750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have issue regarding reading date from external file suppose i have veriable name Date in external file name test.csv, and in the date variable i have observation containing dates with verious format like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date&lt;/P&gt;&lt;P&gt;========&lt;/P&gt;&lt;P&gt;1jan2010&lt;/P&gt;&lt;P&gt;112010&lt;/P&gt;&lt;P&gt;01012010&lt;/P&gt;&lt;P&gt;010110&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i wanted to read this file using single inout statement how can i do that? is there something if else logic we can try in input statement with informat considering the all valid SAS informat for date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how i can do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advanced,&lt;/P&gt;&lt;P&gt;Tushar J. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 15:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-read-different-format-Dates-from-external-file-using/m-p/130342#M10750</guid>
      <dc:creator>Tushar</dc:creator>
      <dc:date>2012-09-25T15:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to read different format Dates from external file using single input statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-read-different-format-Dates-from-external-file-using/m-p/130343#M10751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no informat that can correctly guess all possibilities.&amp;nbsp; e.g. does 112010 represent Nov 20, 2010, Jan 1, 2010, or Nov (1), 2010?&amp;nbsp; Regardless, the following may do what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date anydtdte.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format date date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1jan2010&lt;/P&gt;&lt;P&gt;112010&lt;/P&gt;&lt;P&gt;01012010&lt;/P&gt;&lt;P&gt;010110&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 16:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-read-different-format-Dates-from-external-file-using/m-p/130343#M10751</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-09-25T16:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to read different format Dates from external file using single input statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-read-different-format-Dates-from-external-file-using/m-p/130344#M10752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Arthur for your Answer, i was under impression that this is something i need to work with informat. Or Proc format procedure...&lt;/P&gt;&lt;P&gt;i was just wondering if you explain me how above program is working step by step, like how sas compile it. cause i never heard about anydtdte. format again Thanks a lot. Your program has certainly solved my issue...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 17:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-read-different-format-Dates-from-external-file-using/m-p/130344#M10752</guid>
      <dc:creator>Tushar</dc:creator>
      <dc:date>2012-09-25T17:00:10Z</dc:date>
    </item>
  </channel>
</rss>

