I am working with a data set that has billing cycles. Sadly the billing cycles do not correspond exactly with the start and end dates of the months. I have a column STARTDATE and a column ENDDATE both formatted as dates: yyyymmdd. I need another two columns, one that counts from the STARTDATE to the end of the month i.e. if STARTDATE is 1/20/2011 then count the days until 1/31/2011, and another that counts back from the ENDDATE to the start of the month, i.e. if the ENDDATE is 2/20/2011 then count back to 2/1/2011. Is there any way to do this? The reason is that I need to proportion monthly variables to the billing cycles and of course for a number of the people billed they each have a unique start and end date each month.
... View more