Skip to content
Prev 31307 / 398513 Next

Basic date time arithmetics operations

Fan
1. When we shift or add/substract n month(s) from a date, n should be
refleted in the month level (or more precisely YYYYMM level) arithmetics 
between the resulting date and the original date,

2. For the day of month level, some sort of alignment should be considered. 

The simplest way would be like what's doing the Oracle SQL function 
add_months(d,n): If d is the last day of the month or if the resulting month 
has fewer days than the day component of d, then the result is the last day 
of the resulting month. Otherwise, the result has the same day component as d.

In a time series specialized software like Fame, the function SHIFTMTH
seems having more sophisticated options.

Best
--
Fan


************ VITE, C'EST LE MOMENT DE VOUS ABONNER A L'ADSL !!! **********
Du 3 avril au 5 mai, s?rie limit?e ADSL 128K, cliquez vite ici : http://register.tiscali.fr/adsl/ 
Offre promotionnelle soumise ? conditions, r?serv?e aux nouveaux abonn?s ADSL Tiscali.