- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 06-04-2018 10:13 AM
(2142 views)
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
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you just want straight no of days just use minus.
Data never sleeps
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
I am very new to SAS va, could you show how?
I am very new to SAS va, could you show how?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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