Subject Re: Hourly rate
Author Ali Gökçen
> > > No, this isn't a "time", it's a "duration" or "interval".
Something
> > which
> > > Firebird doesn't support.
> > >
> > Firebird supports mathmatic, it is enough.
>
> You can do maths on it, I know.
>
> But the "time" of 16:00 afternoon divided by 2 does
> not give you a "time" value of 08:00 in the morning.
> Let alone if you have the date of today at a certain
> time.

is it logical? why do you want to do with divide by 2 ?
if you realy want to get half of time then you can
convert the time into computable numeric format and...

cast('00:00' as time)+((mytime-cast('00:00' as time))/2)

what does computers internally when you try to this:
mytime + 60 // add a minute (60 seconds) to mytime

computer converts mytime to 10 based numbers.

(hours*3600)+(minutes*60)+seconds + 60

then rebuilds time from this number.

if there was acceptable reasons for dividing time, developers could
add it.


>
> Another example:
> Oct 21 15:00 (which is a "date and time") minus 2 hours
> (which is NOT a time) gives you Oct 21, 13:00.
>
> See the "2 hours" part - that is a "duration", not a time.
>
> Now, remove 1.5 days. You'll get Oct 20, 03:00.
>
> But 1.5 days - how would you display that? No such thing
> in a "date and time" format, is there?

Again, TIME is not DATE.

DATE is an irregular accumulator of full TIMEs (days).
there is 12 months but days in months are not const.
they can vary between 28 and 31, depend on years, centuries, etc..

There is alot of calander systems such as julian,moon,gregoryan etc..
But a full day (time) is same everywhere.

As an old programmer i don't know and can't imagine to
calculations of TIME or DATE without interval operation.
can you give me the internal operations of a computer
while calculatin: '20.10.2005 03:00' - 1.5 ?

Regards.
Ali