Subject Re: [firebird-support] Decrement Date by 1 hour
Author Jason Dodson
When you add/subtract 1 from a date, it add/removes a day, so if you want to remove an hour, Id gater its a simple
MyDate - (1/24)

Jason

Gary Benade wrote:
>> Dion wrote
>> How do I decrement the system date by an hour ie current_timestamp - 1
>> hour.
>
> I use the standard firebird UDF's, those relevant to your question are:
> ADDMILLISECOND
> ADDSECOND
> ADDHOUR
> ADDDAY
> ADDMONTH
> ADDWEEK
> ADDYEAR
> So you would use ADDHOUR( current_timestamp, -1) to go back one hour
>
> FWIW
> Gary
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>


--
The information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.