Subject RE: [firebird-support] Sum field time
Author Svein Erling Tysvær
Then what you want isn't a time field, you want a duration. By subtracting one TIME value from another, the result would be in the datatype you're looking for - I don't remember whether that it a number with lots of decimals or an integer value (I know that DATETIME fields have the day in the integer part and hours/minutes/seconds in the decimals).

Set

-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Vinicius
Sent: 1. oktober 2008 15:54
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Sum field time

I would like the following result.

01:00 + 03:30 + 01:45 = 06:15

would return only the sum

no matter whether it is morning or evening, this field saves time
allotted and not hours

Thanks,

Vinicius


Martijn Tonies escreveu:
>
> Hi,
>
> > How do I add a field of the type Time in Firebird
> > I tried to give a sum (field_time) but returns error saying that
> > does not support
>
> What result would this give you?
>
> How can you calculate the sum of 03:00AM and 12:34 PM?
>
> Martijn Tonies
> Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB,
> Oracle &
> MS SQL Server
> Upscene Productions
> http://www.upscene.com <http://www.upscene.com>
> My thoughts:
> http://blog.upscene.com/martijn/ <http://blog.upscene.com/martijn/>
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com
> <http://www.databasedevelopmentforum.com>
>
>
> ------------------------------------------------------------------------
>
>
>
> Checked by AVG - http://www.avg.com
> Version: 8.0.173 / Virus Database: 270.7.5/1702 - Release Date: 1/10/2008 09:05
>
>


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


------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org 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