BookmarkSubscribeRSS Feed
peewee
Calcite | Level 5
Hello, I am new to SAS. I am trying to take variable bdate and add it to variable LOS1 to get an actual date. The data for both variables are in days. Can someone help me?

Thanks,
Peewee
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
SAS system architecture uses numeric variables for representing DATE (days since 1/1/1960) and DATETIME (seconds since same date at midnight) values.

Also, there are various SAS functions to use with these variables for increment/decrement and manipulation, such as INTCK, INTNX.

It's likely your external date/datetime fields must be converted, using a SAS INFORMAT or the INPUT function with a suitable INFORMAT.

Suggest you may also want to search the SAS forum archives as well as using the SAS support http://support.sas.com/ website where there is SAS-hosted documentation and supplemental technical / conference materials (extensive) on the topic.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced arguments, this topic / post:

introduction date datetime site:sas.com

intnx intck function site:sas.com

data step programming introduction site:sas.com

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1023 views
  • 0 likes
  • 2 in conversation