<?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 Combining single variable into a date and a time variable in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Combining-single-variable-into-a-date-and-a-time-variable/m-p/354416#M10614</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hava a dataset where i got three variaables for data, one for day, one for month and one for year. I want to combine these three into a single date variable. I have the same problem for time (one for seconds, one for minutes and one for hours) but assume that the solustion for the date issue is the same for creating a time variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help,&lt;/P&gt;
&lt;P&gt;Per&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2017 11:05:21 GMT</pubDate>
    <dc:creator>PerNielsen</dc:creator>
    <dc:date>2017-04-28T11:05:21Z</dc:date>
    <item>
      <title>Combining single variable into a date and a time variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Combining-single-variable-into-a-date-and-a-time-variable/m-p/354416#M10614</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hava a dataset where i got three variaables for data, one for day, one for month and one for year. I want to combine these three into a single date variable. I have the same problem for time (one for seconds, one for minutes and one for hours) but assume that the solustion for the date issue is the same for creating a time variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help,&lt;/P&gt;
&lt;P&gt;Per&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 11:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Combining-single-variable-into-a-date-and-a-time-variable/m-p/354416#M10614</guid>
      <dc:creator>PerNielsen</dc:creator>
      <dc:date>2017-04-28T11:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Combining single variable into a date and a time variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Combining-single-variable-into-a-date-and-a-time-variable/m-p/354418#M10615</link>
      <description>&lt;P&gt;If you already have numeric values you can use functions to convert.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date=mdy(month,day,year);
time=hms(hour,minute,second);
dt1=dhms(mdy(month,day,year),hour,minute,second);
dt2=dhms(date,0,0,time);
format date date9. time time8. dt1 dt2 datetime20.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Apr 2017 11:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Combining-single-variable-into-a-date-and-a-time-variable/m-p/354418#M10615</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-28T11:10:43Z</dc:date>
    </item>
  </channel>
</rss>

