<?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 trouble reading datatime value from tab separated text file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/trouble-reading-datatime-value-from-tab-separated-text-file/m-p/438890#M109463</link>
    <description>&lt;P&gt;I am using this code, which was originally generated in terms of the data formats using an import task:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Bla;
    LENGTH
        Timestamp          8 ;
    FORMAT
        Timestamp        DATETIME18. ;
    INFORMAT
        Timestamp        DATETIME18. ;
    INFILE "&amp;amp;BaseFolder.&amp;amp;FileName2."
	        ENCODING="LATIN9"
	        TERMSTR=CRLF
	        DLM='09'x
	        MISSOVER
	        DSD 
			firstobs=2;
    INPUT
        Timestamp        : ?? ANYDTDTM19. ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, I now get errors&amp;nbsp; and funny entries like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;******************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for source data like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;31/05/2016 00:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please advice how to potentially adjust the above formats? Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 08:52:05 GMT</pubDate>
    <dc:creator>csetzkorn</dc:creator>
    <dc:date>2018-02-21T08:52:05Z</dc:date>
    <item>
      <title>trouble reading datatime value from tab separated text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/trouble-reading-datatime-value-from-tab-separated-text-file/m-p/438890#M109463</link>
      <description>&lt;P&gt;I am using this code, which was originally generated in terms of the data formats using an import task:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Bla;
    LENGTH
        Timestamp          8 ;
    FORMAT
        Timestamp        DATETIME18. ;
    INFORMAT
        Timestamp        DATETIME18. ;
    INFILE "&amp;amp;BaseFolder.&amp;amp;FileName2."
	        ENCODING="LATIN9"
	        TERMSTR=CRLF
	        DLM='09'x
	        MISSOVER
	        DSD 
			firstobs=2;
    INPUT
        Timestamp        : ?? ANYDTDTM19. ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, I now get errors&amp;nbsp; and funny entries like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;******************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for source data like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;31/05/2016 00:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please advice how to potentially adjust the above formats? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 08:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/trouble-reading-datatime-value-from-tab-separated-text-file/m-p/438890#M109463</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2018-02-21T08:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: trouble reading datatime value from tab separated text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/trouble-reading-datatime-value-from-tab-separated-text-file/m-p/438903#M109468</link>
      <description>&lt;P&gt;I'd read it into a character variable, convert the date and time parts separately (substr() and input() functions), and put together with result = date * 86400 + time.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 11:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/trouble-reading-datatime-value-from-tab-separated-text-file/m-p/438903#M109468</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-02-21T11:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: trouble reading datatime value from tab separated text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/trouble-reading-datatime-value-from-tab-separated-text-file/m-p/438904#M109469</link>
      <description>&lt;P&gt;No problem, when using anydtdtm. instead of anydtdtm19.:&lt;/P&gt;
&lt;PRE&gt;data work.forum;
   a = '31/05/2016 00:00:00';
   b = input(a, anydtdtm.);

   format b DATETIME18.;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 11:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/trouble-reading-datatime-value-from-tab-separated-text-file/m-p/438904#M109469</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-02-21T11:16:57Z</dc:date>
    </item>
  </channel>
</rss>

