Después de responder, me di cuenta que la funcion DAYS360 / DIAS360 no cuenta simplemente meses de 30 días, sino que es algo mas complejo:
http://office.microsoft.com/en-us/ex...005209047.aspx
Encontre en la web este código en VB:
http://www.experts-exchange.com/Data..._24634023.html
Y lo traduje a esto
SIN PROBARLO:
Código Delphi
[-]
function Days360(const ANow, AThen: TDateTime; Method: boolean): Integer;
var
dStartDate,
dEndDate: TDateTime;
wStartDay,
wStartMonth,
wStartYear,
wEndDay: Word;
FebruaryAdjustment: Integer;
begin
dStartDate := ANow;
dEndDate := AThen;
DecodeDate(dStartDate, wStartYear, wStartMonth, wStartDay);
wEndDay := DayOf(dEndDate);
if not Method Then
begin
if wStartDay > 30 then
dStartDate := dStartDate - 1;
if (wEndDay = 31) and (wStartDay < 30) then
dEndDate := dEndDate + 1
else
if(wEndDay = 31) and (wStartDay >= 30) then
dEndDate := dEndDate - 1;
if (wStartMonth = 2) and (wStartDay = DaysInAMonth(wStartYear, wStartMonth)) then
FebruaryAdjustment := 30 - wStartDay else
FebruaryAdjustment := 0;
end else
begin
if wStartDay > 30 Then
dStartDate := dStartDate - 1;
if wEndDay > 30 Then
dEndDate := dEndDate - 1;
FebruaryAdjustment := 0;
end;
Result := (MonthsBetween(dStartDate, dEndDate) * 30) + (wStartDay - wStartDay) - FebruaryAdjustment;
end;