Help using Base SAS procedures

Taking variables from the same data set to create a calendar date

Reply
N/A
Posts: 1

Taking variables from the same data set to create a calendar date

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
Super Contributor
Super Contributor
Posts: 3,174

Re: Taking variables from the same data set to create a calendar date

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
Ask a Question
Discussion stats
  • 1 reply
  • 139 views
  • 0 likes
  • 2 in conversation