View Full Version : Creating new variables


freebird2008
09-07-2008, 05:46 PM
How do I subtract two columns of data in sas and use that data to create a new variable? Also I am dealing with time data.

vinux
09-08-2008, 02:17 AM
It is a simple question or I didn't get your question.
If you wanted to create difference of two columns, use data step. and create new variable as the difference of two coulmns.

Mahi
09-08-2008, 08:40 AM
In case you want to find the difference between two date variables(time data) then you should use INTCK() function.

Also check for INTNX() to calculate the difference of a date variable for fixed number of intervals.

Mahi..