How to add days to date - Mailing list pgsql-general

From Alejandro Michelin Salomon \( Adinet \)
Subject How to add days to date
Date
Msg-id !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAhx491Ki2tUS42D/aMPFg1MKAAAAQAAAA6qyMHqYsDEaPzs7YGVsxdQEAAAAA@adinet.com.uy
Whole thread Raw
Responses Re: How to add days to date
Re: How to add days to date
List pgsql-general
Hi:

I have problem trying to add same days to a date.

I have this select :

SELECT '2006-08-01' + FP.carencia + ( FP.prazo * ( MFP.parcela - 1 )) AS
vencimento
  FROM fi_mov_formas_pagamento MFP
       LEFT OUTER JOIN fi_formas_pagamento FP ON ( MFP.idformapagamento =
FP.idformapagamento AND MFP.idempresa = FP.idempresa )
       INNER JOIN hd_cabecalho HDC ON ( MFP.idmovimento = HDC.idhelpdesk AND
MFP.idempresa = HDC.idempresa )
  WHERE MFP.idmovimento = 1
 AND MFP.idempresa = 1
 AND MFP.idtipomovimentacao = 1

'2006-08-01' + FP.carencia + ( FP.prazo * ( MFP.parcela - 1 )) --> This
results in

EX :
'2006-08-01' + 30 + ( 7 * ( 3 - 1 )) ==> '2006-08-01' + 44

All my trys fails.

Can you help me ?

Thanks in advance.

Alejandro Michelin Salmon


pgsql-general by date:

Previous
From: "Harvey, Allan AC"
Date:
Subject: Re: plpgsql dynamic queries and optional arguments
Next
From: Michael Fuhr
Date:
Subject: Re: How to add days to date