<?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 Convert Timestamp to date &amp;amp; time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-Timestamp-to-date-amp-time/m-p/378640#M276799</link>
    <description>&lt;P&gt;Hi, I have a dataset where variable 'Timestamp' has observations like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;15189430314595&lt;BR /&gt;15443763999343&lt;BR /&gt;15443763999343&lt;BR /&gt;15486949615495&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in a sequence. This is in nanoseconds as per the description of the database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert these variables in date (mm/dd/yyyy) &amp;amp; time (hh:mm:ss) format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2017 11:46:53 GMT</pubDate>
    <dc:creator>dhir</dc:creator>
    <dc:date>2017-07-24T11:46:53Z</dc:date>
    <item>
      <title>Convert Timestamp to date &amp; time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Timestamp-to-date-amp-time/m-p/378640#M276799</link>
      <description>&lt;P&gt;Hi, I have a dataset where variable 'Timestamp' has observations like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;15189430314595&lt;BR /&gt;15443763999343&lt;BR /&gt;15443763999343&lt;BR /&gt;15486949615495&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in a sequence. This is in nanoseconds as per the description of the database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert these variables in date (mm/dd/yyyy) &amp;amp; time (hh:mm:ss) format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 11:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Timestamp-to-date-amp-time/m-p/378640#M276799</guid>
      <dc:creator>dhir</dc:creator>
      <dc:date>2017-07-24T11:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Timestamp to date &amp; time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Timestamp-to-date-amp-time/m-p/378649#M276800</link>
      <description>&lt;P&gt;It is essential to know the cutoff timestamp (the moment when 0 nanoseconds were registered).&lt;/P&gt;
&lt;P&gt;With this knowledge, you can do the calculation:&lt;/P&gt;
&lt;P&gt;seconds = nanoseconds / 1000000000&lt;/P&gt;
&lt;P&gt;and then correct for a zero-point that is different from the zero-point of SAS (01jan1960:00:00:00)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As your numbers are rather small, I suspect that you don't really have nanoseconds&lt;/P&gt;
&lt;P&gt;(milli - 1/1000th&lt;/P&gt;
&lt;P&gt;micro - 1/1000000&lt;/P&gt;
&lt;P&gt;nano - 1/1000000000)&lt;/P&gt;
&lt;P&gt;If your values were really nanoseconds, they would just describe a time value between 4:13:09 and 4:18:07. No datetimes here.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 12:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Timestamp-to-date-amp-time/m-p/378649#M276800</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-24T12:01:33Z</dc:date>
    </item>
  </channel>
</rss>

