Hi there,
I'm trying to project quarter-end dates but the calquarter (or calmonth) function doesn't seem to work correctly if the start date is a month with 30 days.
Here's an example where it works correctly (start date is month with 31 days). The result in this case is adjusted for months with 30 and 31 days:
>> t = datetime(2013,05,31):calquarters(1):datetime(2014,05,31)t = 31-May-2013 31-Aug-2013 30-Nov-2013 28-Feb-2014 31-May-2014
Here is an example where it doesn't work correctly (start date is month with 30 days). The result in this case has the 30th of each month as quarter-end, which is not correct:
>> t = datetime(2013,06,30):calquarters(1):datetime(2014,05,31)t = 30-Jun-2013 30-Sep-2013 30-Dec-2013 30-Mar-2014
I appreciate any help with this. Many thanks!!!
Alex
Best Answer