Hello
How do I get the difference in numbers between two dates?
I have tried using "Difference fro previous period", but It does not work with days?
Please look at Excel spreadsheet column "C"
Thanks
SAS stores dates as counts of days (from a given starting point, which is 1960-01-01). The difference in days between two dates can therefore be calculated with a simple subtraction.
I have not got it to work in 7.4 but in 8.2 it works by using relative period and set offset to -1 and using "Inherit".
It works with days, but if you have a gap between the days you will get a missing value.
//Fredrik
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.