<?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: Numeric date to date and time in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Numeric-date-to-date-and-time/m-p/317076#M21348</link>
    <description>&lt;P&gt;You started out well.&amp;nbsp; The formulas you applied convert from an integer to a SAS date.&amp;nbsp; So if you had picked a date format instead of a datetime format, you would see that the formula worked properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To convert from the date that you obtained to a datetime, you need to convert from days to seconds.&amp;nbsp; Multiply your result by 24 * 60 * 60.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2016 17:28:18 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2016-12-06T17:28:18Z</dc:date>
    <item>
      <title>Numeric date to date and time</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Numeric-date-to-date-and-time/m-p/317074#M21347</link>
      <description>&lt;P&gt;Test_date = numeric 20160501&lt;/P&gt;
&lt;P&gt;Desired Result = 01MAY2016:00:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried the advanced expression in in Enterprise Guide:&lt;/P&gt;
&lt;P&gt;INPUT(PUT(t1.TEST_DATE,8.),YYMMDD10.)&lt;/P&gt;
&lt;P&gt;format= DATETIME20&lt;/P&gt;
&lt;P&gt;Result = 01JAN1960:05:42:55&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 17:21:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Numeric-date-to-date-and-time/m-p/317074#M21347</guid>
      <dc:creator>carmendee</dc:creator>
      <dc:date>2016-12-06T17:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric date to date and time</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Numeric-date-to-date-and-time/m-p/317076#M21348</link>
      <description>&lt;P&gt;You started out well.&amp;nbsp; The formulas you applied convert from an integer to a SAS date.&amp;nbsp; So if you had picked a date format instead of a datetime format, you would see that the formula worked properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To convert from the date that you obtained to a datetime, you need to convert from days to seconds.&amp;nbsp; Multiply your result by 24 * 60 * 60.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 17:28:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Numeric-date-to-date-and-time/m-p/317076#M21348</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-12-06T17:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric date to date and time</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Numeric-date-to-date-and-time/m-p/317077#M21349</link>
      <description>&lt;P&gt;Your value is a date so to get a date time you need a bit more:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   datetime = dhms(input(put(20160501,8.),yymmdd8.),0,0,0);
   put datetime datetime20.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the DHMS function adds hours, minutes and seconds to a date value to create a datetime.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 17:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Numeric-date-to-date-and-time/m-p/317077#M21349</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-06T17:31:05Z</dc:date>
    </item>
  </channel>
</rss>

