DATA Step, Macro, Functions and more

combining sasdate value with sastime value

Reply
Super Contributor
Posts: 291

combining sasdate value with sastime value

Once upon a time I knew this ...

I get a record back from Oracle in datetime format.

I use date=datepart(OraValue) to build a sas date value (days since 01Jan1960).
I use time=timepart(OraValue) to build a sas time value (seconds since midnight).

How do I put date & time back together as a sas datetime value?

Thanks,
wd
Respected Advisor
Posts: 3,799

Re: combining sasdate value with sastime value

[pre]datetime = dhms(date,0,0,time);[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 116 views
  • 0 likes
  • 2 in conversation