<?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 How to read this time and time in SAS? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305154#M60888</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to read a CSV dataset in SAS that has time-date format like this:&amp;nbsp;2015-01-01T00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be appreciated if help me read this time-date in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2016 17:28:17 GMT</pubDate>
    <dc:creator>Palang</dc:creator>
    <dc:date>2016-10-17T17:28:17Z</dc:date>
    <item>
      <title>How to read this time and time in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305154#M60888</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to read a CSV dataset in SAS that has time-date format like this:&amp;nbsp;2015-01-01T00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be appreciated if help me read this time-date in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 17:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305154#M60888</guid>
      <dc:creator>Palang</dc:creator>
      <dc:date>2016-10-17T17:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to read this time and time in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305158#M60889</link>
      <description>&lt;P&gt;That looks like and E8601DT16. informat should work.How to specify that may differ depending on exactly how your read the CSV&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 17:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305158#M60889</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-17T17:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to read this time and time in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305161#M60890</link>
      <description>&lt;P&gt;Thank you for your response. But this informat does not work with the following piece of code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data diss.rawdata (drop=fname);&lt;BR /&gt;length myfilename $100;&lt;BR /&gt;length name $25;&lt;BR /&gt;set diss.dirlist;&lt;/P&gt;&lt;P&gt;informat Interval E8601DT16.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filepath = "&amp;amp;dirname\"||fname;&lt;BR /&gt;infile dummy filevar = filepath length=reclen end=done FIRSTOBS=2 /*obs=4*/ missover dsd;&lt;/P&gt;&lt;P&gt;do while(not done);&lt;BR /&gt;myfilename = filepath;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input STID $ Interval : $16.&lt;BR /&gt;RELH TAIR WSPD WVEC TA9M WS2M;&lt;/P&gt;&lt;P&gt;format Interval datetime22.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date=datepart(Interval);&lt;BR /&gt;Time=timepart(Interval);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;drop myfilename name;&lt;BR /&gt;*format Date MMDDYY10. Time hhmm.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 17:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305161#M60890</guid>
      <dc:creator>Palang</dc:creator>
      <dc:date>2016-10-17T17:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to read this time and time in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305171#M60893</link>
      <description>&lt;P&gt;INFORMATS are used by INPUT statements in a data step.&lt;/P&gt;
&lt;P&gt;When you use this code:&lt;/P&gt;
&lt;P&gt;input STID $ Interval : $16.&lt;/P&gt;
&lt;P&gt;You told SAS to read your interval variable as character 16.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try replacing these lines:&lt;/P&gt;
&lt;P&gt;input STID $ Interval : $16.&lt;BR /&gt;RELH TAIR WSPD WVEC TA9M WS2M;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input STID $ Interval &lt;BR /&gt;RELH TAIR WSPD WVEC TA9M WS2M;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 17:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305171#M60893</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-17T17:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to read this time and time in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305179#M60895</link>
      <description>&lt;P&gt;Thank you very much for your respone. That was actually my mistake in defining variable "Interval". Iused the folloing informat with other formats and it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input STID $ Interval : B8601DT.;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 18:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-this-time-and-time-in-SAS/m-p/305179#M60895</guid>
      <dc:creator>Palang</dc:creator>
      <dc:date>2016-10-17T18:08:07Z</dc:date>
    </item>
  </channel>
</rss>

