Question: how to calculate days between two dates sas?
Answer: In general, the difference between two SAS dates in days can most easily be calculated as duration=end_date - start_date. If you want to consider people who (in this case) are admitted and discharged on the same date as having a duration of 1 day, then the formula becomes duration=end_date-start_date+1.