Subject Re: [firebird-support] Where is the DateDiff function in Firebird 2.03?
Author Helen Borrie
At 06:51 AM 20/05/2009, you wrote:
>Has the DateDiff function been deprecated? I can't seem to get a simple query like this to work
>
>select datediff(
>second, cast(current_date as timestamp), current_timestamp)
>
>I get an unknown token for second (Using Database Workbench v2.8.8b Pro).

When passing an expression as a parameter, wrap the expression in brackets:

select datediff (second, (cast(current_date as timestamp)), current_timestamp)

./hb