BookmarkSubscribeRSS Feed
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?

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 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

intnx intck function

data step programming introduction


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
  • 2 in conversation