Subject RE: [firebird-support] date functions
Author Russell Eva
Excellent! Thank you all for your response, This, however, will (I trust)
solve my problem



From: Helen Borrie [mailto:helebor@...]
Sent: Friday, December 05, 2003 14:17
Subject: RE: [firebird-support] date functions

At 01:20 PM 5/12/2003 +0200, you wrote:
>OK what we have to do is automatically raise (billing) transactions for all
>days between last billed transaction and the day that the process fires.
>What we have is: Today (excluding time portion or defaulting to 00:00:00),
>The date in for the billing, and the date out for the billing. We must
>establish if the date out is earlier than start of day tomorrow (end of day
>today) then a new transaction must be created with a date in of start of
>FOR THAT DAY's tomorrow and date out for start of day the following day.
>Delphi trunc - ing the dates works just fine but this must take place in a
>If I could get just the date portion of the datetime then I could (as you
>know) just add integer values to increment the days. If there is another
>way to achieve this, I'm all ears :-)

Indeed there is. If you do
cast (any_timestamp as date) you get a date-only value. Then do
cast(that_date as timestamp) and you get the date + 00:00:00.0000.

You can also do
cast(any_timestamp as time) to get and hold the time-of-day from the
datestamp, if you need to perform some calculation when the day rolls over.


Yahoo! Groups Sponsor


r/ban/syah/default.asp> click here


To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to the Yahoo!
<> Terms of Service.

[Non-text portions of this message have been removed]