Subject Re: [ib-support] Help - Sum(TimeType)
Author Ageu Duarte Junior
The Employee work every day in different times, and he can start and stop to
job any time. for example:

In the date 01-Jul-2002 he started at 08:00 am and stop at 11:30 am, so he
worked 03:30.
In the date 02-Jul-2002 he started at 08:30 am and stop at 11:45 am, so he
worked 03:15.
In the date 03-Jul-2002 he started at 08:15 am and stop at 12:00 pm, so he
worked 03:45.

I want to pay for him job

Total hours worked: 10:30
Price by hour: $ 50,00
Amount: $ 525,00

Thanks Advance


> I haven't tried it but something here seems a little silly to me. Why
would
> you make the HoursWork (at unit of measurment), a TIME datatype, which is
> the Time Of Day.. Make it an Integer or something more meaning full (for
> math operations).. What you are asking, in the SQL, is what's the sum of
> 06:00 (6:00 am) + 14:00 (2:00 pm).. That doesn't make sense to me.. Isn't
> what you really want the HoursWorked to be something like, say 8 (8 hours
> worked) maybe one day, and say 10 (10 hours worked another day) such that
> now the sum is 18 (18 hours total worked on those two days)..
>
> Best regards,
> Fred Wilson
> SE, Bell & Howell
> fred.wilson@...
>
>
>
> -----Original Message-----
> From: Ageu Duarte Junior [mailto:ageu@...]
> Sent: Thursday, July 25, 2002 12:38 PM
> To: ib-support@yahoogroups.com
> Subject: [ib-support] Help - Sum(TimeType)
>
>
> Hello
>
> How can I do to solution this problem:
>
> I have a table with three Columns: The name is EmployeeTimeWork, and the
> columns are:
>
> EmplyeeID Char(3)
> DateWorked Date
> HoursWorked Time
>
> I need a statement to sum the hours worked between dates, I tried it:
>
>
> SELECT SUM(HourWorked) FROM EmployeeTimeWork
> WHERE EmployeeID = :ID
> AND DateWorked >= :DateFirst
> AND DateWorked <= :DateLast
>
> But doesn't Work.
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>