Subject | Firebird SQL built-in function DATEADD with negative argument |
---|---|
Author | Mike |
Post date | 2010-06-10T12:40:45Z |
When I use the DateAdd function in SQL it works OK with the following syntax:
DateAdd (MONTH, Delta, DateLast)
where Delta contains a number of months and DateLast contains a valid Date value.
However, if I want to decrement the result I use the following syntax:
DateAdd (MONTH, -Delta, DateLast)
and I get "Dynamic SQL error expression evaluation not supported".
I have tried -(Delta) ; -[Delta] ; [Delta]*-1 and so on but with no success.
What is the correct syntax for subtracting using DateAdd? Or, is there a bug?
Mike Watson
Datos Informatica.
DateAdd (MONTH, Delta, DateLast)
where Delta contains a number of months and DateLast contains a valid Date value.
However, if I want to decrement the result I use the following syntax:
DateAdd (MONTH, -Delta, DateLast)
and I get "Dynamic SQL error expression evaluation not supported".
I have tried -(Delta) ; -[Delta] ; [Delta]*-1 and so on but with no success.
What is the correct syntax for subtracting using DateAdd? Or, is there a bug?
Mike Watson
Datos Informatica.