<?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: SAS 9.4 Datetime format problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481416#M286746</link>
    <description>&lt;P&gt;E8601DZw.d has another limitation: "&lt;SPAN class="xis-userSuppliedValue"&gt;ffffff &lt;/SPAN&gt;are optional fractional seconds, with a precision of &lt;STRONG&gt;up to six&lt;/STRONG&gt; digits" (from the documentation), without that i would suggest to read as string, append ":00" and then using input-statement to create a sas-datetime, but i am not sure whether this works.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2018 10:45:36 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2018-07-26T10:45:36Z</dc:date>
    <item>
      <title>SAS 9.4 Datetime format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481412#M286745</link>
      <description>&lt;P&gt;Hi all!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with loading some data because of the date-time format. Data comes like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2015-03-31T12:15:17.142412000+11&lt;BR /&gt;that is, yyyy-mm-ddThh:mm:ss.fffffffff+hh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which in SAS 9.4 (the one i'm using) would be "E8601DZw.d". However, it doesn't load correctly, so I started searching for a solution and&amp;nbsp;looking in the SAS documentation&amp;nbsp;&lt;A title="E8601DZw.d Informat" href="http://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#p14nbxgmr6gn7tn1ntmuulgawrih.htm" target="_self"&gt;E8601DZw.d Informat&lt;/A&gt;,&amp;nbsp;I found it explicitly says: "&lt;STRONG&gt;&lt;SPAN class="xis-selection"&gt;Restriction&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;&amp;nbsp;The shorter form +|–&lt;/SPAN&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;hh&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is not supported.", which unfortunately is mine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thus, what can I do? Is there any other way to read my format in this version of SAS?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also it is important to know that the data file is a 80GB csv file, so, it takes a while to read it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My code (edited):&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;data WORK.tnq ;
infile 'C:\Folder\Test.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;

informat Date_Time E8601DZ32.6 ;
format Date_Time E8601DZ32.6 ;

input&amp;nbsp;Date_Time $;

* Splitting Date and Time;
Date = datepart(Date_Time);
Time = timepart(Date_Time);
informat Date E8601DA10. ;
informat Time E8601TM15.6 ;
format Date E8601DA10. ;
format Time E8601TM15.6 ;

if _ERROR_ then call symputx('_EFIERR_',1);

month = month(date) + (year(date)*12) - 24164;

run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 11:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481412#M286745</guid>
      <dc:creator>Rodorell</dc:creator>
      <dc:date>2018-07-26T11:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Datetime format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481416#M286746</link>
      <description>&lt;P&gt;E8601DZw.d has another limitation: "&lt;SPAN class="xis-userSuppliedValue"&gt;ffffff &lt;/SPAN&gt;are optional fractional seconds, with a precision of &lt;STRONG&gt;up to six&lt;/STRONG&gt; digits" (from the documentation), without that i would suggest to read as string, append ":00" and then using input-statement to create a sas-datetime, but i am not sure whether this works.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 10:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481416#M286746</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-07-26T10:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Datetime format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481419#M286747</link>
      <description>&lt;P&gt;The fractional seconds are not a problem. I succesfully loaded some similar data that come with 9 digits, but I used 6 (the maximum, as you point out). It worked perfectly. I think my problem relates to the last +HH part. How can I read it as string? Maybe that would be an approach, although it might take a long long time (80 GB file).&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 10:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481419#M286747</guid>
      <dc:creator>Rodorell</dc:creator>
      <dc:date>2018-07-26T10:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Datetime format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481421#M286748</link>
      <description>&lt;P&gt;Post the data-step you are using right now to read the file, then the suggestion will fit in better.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 10:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481421#M286748</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-07-26T10:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Datetime format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481428#M286749</link>
      <description>You mean, my code? I edited my post. Thank you!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 26 Jul 2018 11:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481428#M286749</guid>
      <dc:creator>Rodorell</dc:creator>
      <dc:date>2018-07-26T11:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Datetime format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481429#M286750</link>
      <description>&lt;P&gt;Appending the ':00' works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input instring :$32.;
dtval = input(cats(instring,':00'),E8601DZ35.);
format dtval datetime26.6;
cards;
2015-03-31T12:15:17.142412000+11
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Edit: corrected the length of instring down to 32.&lt;/FONT&gt;&lt;/EM&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 11:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481429#M286750</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-26T11:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Datetime format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481751#M286751</link>
      <description>It worked! Thank you!</description>
      <pubDate>Fri, 27 Jul 2018 03:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-Datetime-format-problem/m-p/481751#M286751</guid>
      <dc:creator>Rodorell</dc:creator>
      <dc:date>2018-07-27T03:18:51Z</dc:date>
    </item>
  </channel>
</rss>

