RES: [GENERAL] How to add days to date

2006-08-16 Thread Alejandro Michelin Salomon \( Adinet \)
->De: Michael Fuhr [mailto:[EMAIL PROTECTED] -->Enviada em: terça-feira, 15 de agosto de 2006 22:17 -->Para: Alejandro Michelin Salomon ( Adinet ) -->Cc: Pgsql-General -->Assunto: Re: [GENERAL] How to add days to date --> --> -->On Tue, Aug 15, 2006 at 10:10:27PM -0300, Al

Re: [GENERAL] How to add days to date

2006-08-16 Thread Alban Hertroys
Alejandro Michelin Salomon ( Adinet ) wrote: Hi: I have problem trying to add same days to a date. '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 Looks like you could use the interval type her

Re: [GENERAL] How to add days to date

2006-08-15 Thread Michael Fuhr
On Tue, Aug 15, 2006 at 10:10:27PM -0300, Alejandro Michelin Salomon ( Adinet ) wrote: > EX : > '2006-08-01' + 30 + ( 7 * ( 3 - 1 )) ==> '2006-08-01' + 44 > > All my trys fails. The error message hints at what's wrong: test=> SELECT '2006-08-01' + 30 + (7 * (3 - 1)); ERROR: invalid input synta

[GENERAL] How to add days to date

2006-08-15 Thread Alejandro Michelin Salomon \( Adinet \)
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