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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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