Subject Re: [firebird-support] udfs?
Author Milan Babuskov
Datatal AB - Gauffin, Jonas wrote:
> Hello
>
> In mysql I use a function called date_sub that substract X days from a
> date.
> I can also use a function called Now() that returns the current
> date/time.
> These two functions I use in a sqlquery, here is the interesting part:
>
> [...] WHERE from_date > DATE_SUB(now(), interval 2 day) [...]
>
> that gives me all entries written from 2 days ago to present time.
> Are there any UDFs availible that I can use in a similar query for
> firebird?

Try:

WHERE from_date > current_timestamp - 2

--
Milan Babuskov
http://fbexport.sourceforge.net