Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 26th, 2003, 06:35 AM
Registered User
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calculate time period


May I ask a question about Access here!.

 I have a table which has 3 feilds; Date, CheckIn and CheckOut in Short Time format.

I've created a query which will calculate how many hours are there from CheckIn to CheckOut of that date. Something like [CheckOut]-[CheckIn]

What is the build in Function I should use? I've tried HOUR( )
function but it won't cover the minute and second.

Can anyone here help me out.


Duanchai T.
Old July 26th, 2003, 07:26 AM
Registered User
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Guys,

Don't worry. I just worked it out. Here is my solution

I created a query with the field as follow:

TotalHour: Hour([CheckOut]-[CheckIn]) & "." & Minute([CheckOut]-[CheckIn])

If anyone knows the better solution, please share your ideas.


Duanchai T.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Time out before actual timeout period zaheerabbas.sk ASP.NET 1.0 and 1.1 Basics 1 April 4th, 2007 04:45 AM
Calculate time divovsky Access 2 March 15th, 2007 03:10 PM
Calculate Time sswingle Classic ASP Basics 1 April 10th, 2006 08:30 AM
How do I execute a code every X period of time? Master_D PHP How-To 3 June 8th, 2004 10:10 AM
calculate time between two dates RMorales2831 Access 1 February 13th, 2004 11:38 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.