db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pertti Ylijukuri" <pertti.ylijuk...@gmail.com>
Subject RE: Sum of time
Date Tue, 17 Jul 2007 09:30:38 GMT
Maybe easiest way is use big int type in duration field and store duration
time in milliseconds

-----Original Message-----
From: Dmitri Pissarenko [mailto:dmitri.pissarenko@gmail.com] 
Sent: 17. heinäkuuta 2007 11:08
To: Derby Discussion
Subject: Re: Sum of time


On 7/17/07, Peter Ondruska <peter.ondruska@gmail.com> wrote:
> Well, first of all:
> what do you expect as a value for (Date)A + (Date)B ?
> What you want is an interval (perhaps in seconds) instead of time as
> duration.

I don't see the difference between interval and "time as duration".

If I have following records

Place: place1 Duration: 00:00:10
Place: place2 Duration: 01:30:40
Place: place3 Duration: 20:00:00

I need the output

place1 - 21:30:50.

Best regards

Dmitri Pissarenko

View raw message