Help me with Time Conversion in Access

I have StartDate and EndDate. How to find the difference in business hours and minutes
StartDate                      EndDate                       
5/20/2013 9:32      5/21/2013 16:24      
5/20/2013 9:32      5/21/2013 16:27      
5/20/2013 9:32      5/21/2013 16:29      
5/20/2013 9:32      5/21/2013 16:31      
I am using formula to convert to Minutes:
Minutes: DateDiff("n",[StartDate],[EndDate])
TurnAround Time: Int(([Minutes]\60)\24) & ":" & Format(([Minutes]\60) Mod 24,"00") & ":" & Format([Minutes] Mod 60,"00")
it does not work
and I need to  count only business (8 hours)
Roman FAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeCommented:
I would recommend you create a function for this.  Pass the function the two date/time values, then use some logic to determine whether:

1.  The two values are on the same date (then use datediff)
2.  If the two values are on two successive dates, in which case you have to do the date diff between date/time1 and your end of day (whatever time that is), and then another calculation for the difference between your start time and date/time2.
3.  If there is more than one day between them, you would need to do the same as #2, plus for the extra days, determine whether they are business days or not and add the appropriate number of minutes.
0
Shaun KlineLead Software EngineerCommented:
Try this to get the business minutes:
DateDiff("n", startdate, enddate) - DateDiff("d", startdate, enddate) * 16 * 60

You would need to check that enddate is greater than startdate.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Roman FAuthor Commented:
Thank you, but i did not get
0
Roman FAuthor Commented:
To: Shaun_Kline thank you works fine
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.