Subject | RE: [firebird-support] Trigger / Month question |
---|---|
Author | Epstein, Ed |
Post date | 2004-06-29T17:31:06Z |
>>Hi,I do something like that in my own code.
>>
>>Is it possible to minus the 'NOW' constant with 3 months ? I'm
>>using 'NOW' - 90, but that's not really correct.
>>
>>Thanks in advance,
>>
>>N.
CAST('NOW' AS TIMESTAMP) - 90
Its not entirely accurate as I am sure you are finding out. Its good enough
for my purposes though. What you need is a DateAdd UDF. The one UDF
Library that I know of that has this is rFunc (rFunc.sourceforge.net).
It has a IncDate(d,i1,i2,i3) function that would be accurate for you. I
would imagine it would be something like
IncDate('NOW',0,-3,0) which would add -3 months to the current timestamp.
Hope this helps
[Non-text portions of this message have been removed]