<?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: import wizard informat DATETIME help in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/301845#M8551</link>
    <description>&lt;P&gt;Try an informat of anydtdm21 and a format of datetime21&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2016 23:38:51 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-09-30T23:38:51Z</dc:date>
    <item>
      <title>import wizard informat DATETIME help</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/301840#M8550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS9.4 an trying to import a csv file&amp;nbsp;with the import wizard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having difficulty with a date and time format. My data comes in with a date and time in the one cell in the format 'DD-MM-YYYY HH:MM:SS'. I would like to continue working with it in this format, but am not sure whether SAS recognises it as date and time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the import wizard code (incomplete) I am currently using, but it imports the SET_DATE variable as a text:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro import(wk);&lt;BR /&gt;data WORK._&amp;amp;wk.;&lt;BR /&gt;%let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;infile "C:\Users\Pete\Desktop\&amp;amp;wk..csv" delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;informat SORT_ID $10. ;&lt;BR /&gt;informat EVENT_ID $10. ;&lt;BR /&gt;informat SET_DATE $21. ;&lt;BR /&gt;format SORT_ID $10. ;&lt;BR /&gt;format EVENT_ID $10. ;&lt;BR /&gt;format SET_DATE best. ;&lt;BR /&gt;&lt;BR /&gt;input&lt;BR /&gt;SPORTS_ID $&lt;BR /&gt;EVENT_ID $&lt;BR /&gt;SETTLED_DATE $&lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using ANYDTDTME21 and several other formats but am having trouble reading in that variable in a usable datetime format. Any help wold be great, thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 22:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/301840#M8550</guid>
      <dc:creator>tsetredst</dc:creator>
      <dc:date>2016-09-30T22:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: import wizard informat DATETIME help</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/301845#M8551</link>
      <description>&lt;P&gt;Try an informat of anydtdm21 and a format of datetime21&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 23:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/301845#M8551</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-30T23:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: import wizard informat DATETIME help</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/301848#M8552</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply - that worked a charm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspected it may have had something to do with inconsistency between the in/format aspect, but am evidently quite new to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 23:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/301848#M8552</guid>
      <dc:creator>tsetredst</dc:creator>
      <dc:date>2016-09-30T23:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: import wizard informat DATETIME help</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/302064#M8565</link>
      <description>&lt;P&gt;Every so often, depending on the actual format of the text the ANYDTDTME works better as ANYDTDTME32. even though there are only 21 or other lower number of characters involved.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 14:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/import-wizard-informat-DATETIME-help/m-p/302064#M8565</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-03T14:30:16Z</dc:date>
    </item>
  </channel>
</rss>

