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

code for a date/time field to get total hours

P: 1
I have a time sheet in access with the foloowing fields.

starttime
timeout1
timein1
timeout2
timein2
finishtime

I am trying to get the total hours worked for each day.
most of the time the timeout2 and timein2 will be blank or null.

I am not very good at coding but am learning on the fly.

My problem is, if the timeout2 and timein2 fields are blank/null how do i get it to then calculate timein1 to finishtime? I do need it to calculate timeout2 and timein2 if time is entered in those fields though and ignore them and go to timein1/finishtime if blank/null.


can anyone please help? I have attached a quick sample. I tried to do it in the query but no luck. I there is code possible please advise. thanks again.....:)
Attached Files
File Type: zip Time database for forum.zip (18.7 KB, 46 views)
Jan 12 '12 #1
Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,707
It's good to include the fields, though as it's Access I assume they are in a table rather than a sheet.

What you need to include in the question though, is the logic you wish to implement. Without this we are just guessing at the question, which is not good for anyone.
Jan 12 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.