Subject | Re: [firebird-support] view and computation |
---|---|
Author | Markus Ostenried |
Post date | 2013-07-31T08:42Z |
On Wed, Jul 31, 2013 at 9:31 AM, Olaf Kluge <olaf.kluge@...> wrote:
that :)
Have a look at DATEDIFF function:
http://www.firebirdsql.org/refdocs/langrefupd25-intfunc-datediff.html
There's also DATEADD if you want to add some other unit than day to a date:
http://www.firebirdsql.org/refdocs/langrefupd21-intfunc-dateadd.html
HTH,
Markus
[Non-text portions of this message have been removed]
> **You are trying to subtract a date from another date. Not sure if they like
> Hello,
>
>
> in a view, the following expression is possible :
> .(a.eingangsdatum+coalesce(c.zahldauer,0)) as FAE,.
>
> But how can I take the current date in relation? For example:
>
> cast((current_date - (a.eingangsdatum+coalesce(c.zahldauer,0))) as integer)
> as FIN
>
> I would like to calculate when the payment will be due.
>
that :)
Have a look at DATEDIFF function:
http://www.firebirdsql.org/refdocs/langrefupd25-intfunc-datediff.html
There's also DATEADD if you want to add some other unit than day to a date:
http://www.firebirdsql.org/refdocs/langrefupd21-intfunc-dateadd.html
HTH,
Markus
[Non-text portions of this message have been removed]