From: Kenneth M. Lin on
Okay, so I have two variables, one date and one time, both are in SAS
dataset. Why is it that SAS doesn't have a function to combine them
together to create a datetime variable? I could apply put function to each
field, concatenate them, then input using datetime format. I could also
multiply the date variable by 60 * 60 * 24 and add the time variable into it
since SAS stores dates and times as numeric fields.

From: Barry Schwarz on
Doesn't your reference describe the DHMS function?
dt = dhms(d,,,t);

On Wed, 31 Mar 2010 20:30:51 -0700, "Kenneth M. Lin"
<kenneth_m_lin(a)sbcglobal.net> wrote:

>Okay, so I have two variables, one date and one time, both are in SAS
>dataset. Why is it that SAS doesn't have a function to combine them
>together to create a datetime variable? I could apply put function to each
>field, concatenate them, then input using datetime format. I could also
>multiply the date variable by 60 * 60 * 24 and add the time variable into it
>since SAS stores dates and times as numeric fields.

--
Remove del for email
From: a on
On Mar 31, 11:26 pm, Barry Schwarz <schwa...(a)dqel.com> wrote:
> Doesn't your reference describe the DHMS function?
>     dt = dhms(d,,,t);
>

ERROR 159-185: Null parameters for DHMS are invalid

169 data test;
170 date = today();
171 time = time();
172 dt = dhms(date,0,0,time);
173 put dt=datetime.;
174 run;

dt=01APR10:06:40:21