Leonid Batkhan describes and discusses pros and cons of 3 different algorithms and SAS code implementations to calculate length of overlap of date/time intervals and integer intervals in general.
Calculating the overlap of date/time intervals was published on SAS Users.