By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

Problem with calculations!

P: n/a
Hi all,

I'm creating a TimeSheet Database and I need to calculate two
different set of times in one field (Workedhours).Does anybody knows a
function that will allow me to add(Hours and Hours1)and get the result
in (workedhours). I also need a function where(Hours) is equal to
(WorkedHours) because sometimes the employee just works one set of
time.*the data type of these fields is text.

ex:

Start Stop Hours Start Stop Hours1 WorkedHours
8:00am 03:00pm 07:00 08:00am 04:00pm 08:00

Thanks in advance.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I suggest ignoring the Hours and Hours1 fields as they currently exist
and calculate them when you need the total hours as a floating point
number:

DateDiff("n", Start, Stop) / 60

For example:

DateDiff("n", "08:00am", "03:30pm") / 60

returns 7.5. With this technique you can simply add the results of
two expression to get the total hours worked. HTH

Rick Collard
www.msc-lims.com
On 18 Feb 2004 08:23:24 -0800, cs********@partners.org (christian)
wrote:
Hi all,

I'm creating a TimeSheet Database and I need to calculate two
different set of times in one field (Workedhours).Does anybody knows a
function that will allow me to add(Hours and Hours1)and get the result
in (workedhours). I also need a function where(Hours) is equal to
(WorkedHours) because sometimes the employee just works one set of
time.*the data type of these fields is text.

ex:

Start Stop Hours Start Stop Hours1 WorkedHours
8:00am 03:00pm 07:00 08:00am 04:00pm 08:00

Thanks in advance.


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.