<?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: merge &amp;quot;date&amp;quot; and &amp;quot;time&amp;quot; as a variable &amp;quot;date and time&amp;quot; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73711#M21377</link>
    <description>OK, for now I fixed it with your help.&lt;BR /&gt;
&lt;BR /&gt;
1. transfer those strings into a SAS date:&lt;BR /&gt;
&lt;BR /&gt;
sas_date=input(substr(string_date, 1, 10), mmddyy10.);&lt;BR /&gt;
&lt;BR /&gt;
2. using data_null_'s code:&lt;BR /&gt;
&lt;BR /&gt;
it works now! &lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
    <pubDate>Tue, 21 Sep 2010 21:28:36 GMT</pubDate>
    <dc:creator>Ken_oy</dc:creator>
    <dc:date>2010-09-21T21:28:36Z</dc:date>
    <item>
      <title>merge "date" and "time" as a variable "date and time"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73708#M21374</link>
      <description>I have a variable "date" and a "time" for each patient. &lt;BR /&gt;
I want to merge them to one variable "date and time"， is any way I can do that? &lt;BR /&gt;
&lt;BR /&gt;
Thanks!

Message was edited by: Ken_oy</description>
      <pubDate>Tue, 21 Sep 2010 20:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73708#M21374</guid>
      <dc:creator>Ken_oy</dc:creator>
      <dc:date>2010-09-21T20:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: merge "date" and "time" as a variable "date and time"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73709#M21375</link>
      <description>Are they SAS dates and times?&lt;BR /&gt;
&lt;BR /&gt;
If so then you just need to convert them to the proper units and add them together.&lt;BR /&gt;
&lt;BR /&gt;
[pre]datetime = dhms(date,0,0,time);[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Is commonly used.</description>
      <pubDate>Tue, 21 Sep 2010 20:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73709#M21375</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-09-21T20:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: merge "date" and "time" as a variable "date and time"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73710#M21376</link>
      <description>Thanks for your quick reply.&lt;BR /&gt;
&lt;BR /&gt;
I test the code from you, it works for SAS date and SAS time. &lt;BR /&gt;
&lt;BR /&gt;
But my problem is, I have character variables instead, all strings&lt;BR /&gt;
&lt;BR /&gt;
i.g.: "date"="01/01/2007"; "time"="13:00:00"&lt;BR /&gt;
&lt;BR /&gt;
How to transfer all these strings into a SAS date9. format? thanks!</description>
      <pubDate>Tue, 21 Sep 2010 20:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73710#M21376</guid>
      <dc:creator>Ken_oy</dc:creator>
      <dc:date>2010-09-21T20:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: merge "date" and "time" as a variable "date and time"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73711#M21377</link>
      <description>OK, for now I fixed it with your help.&lt;BR /&gt;
&lt;BR /&gt;
1. transfer those strings into a SAS date:&lt;BR /&gt;
&lt;BR /&gt;
sas_date=input(substr(string_date, 1, 10), mmddyy10.);&lt;BR /&gt;
&lt;BR /&gt;
2. using data_null_'s code:&lt;BR /&gt;
&lt;BR /&gt;
it works now! &lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Tue, 21 Sep 2010 21:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/merge-quot-date-quot-and-quot-time-quot-as-a-variable-quot-date/m-p/73711#M21377</guid>
      <dc:creator>Ken_oy</dc:creator>
      <dc:date>2010-09-21T21:28:36Z</dc:date>
    </item>
  </channel>
</rss>

