473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

What Field Type & Function to determine Time

Hi,

Just a little background information on the project I am working on!

I am responsible for creating a database to automatically generate travel claims for conference attendees (Approx. 300) using Access 2003. For our staff to accurately determine which meal allowances they are entitled to claim, we have to determine the travel distance and travel time using Google Map (something similar).

For example: an Attendee X has to be at the conference by 11am. It will take X 1hr and 54 minutes to drive to the conference so he should leave by 9:00 to arrive on time. This individual will not be allowed to claim for breakfast.

Now for the questions:

1.What field type do I use to capture the travel time? Date/Time or Text? How should the information be entered? 1:54 minutes, 1 hr 54 m etc. Should I convert the hours and minutes to minutes?

2.What function do we use to show the departure time? The claims should show ideal departure time?

Thanks in advance.
Aug 14 '08 #1
3 1612
hjozinovic
167 100+
1.What field type do I use to capture the travel time? Date/Time or Text? How should the information be entered? 1:54 minutes, 1 hr 54 m etc. Should I convert the hours and minutes to minutes?
You should use Date/Time field type formatted like this: hh:mm

2.What function do we use to show the departure time? The claims should show ideal departure time?
In a query add a field like this:
[HTML]DepartureTime: Format([ArrivalTime]-[TravelTime];"hh:mm";)[/HTML]
Aug 14 '08 #2
It worked! Thank you so much!
Aug 14 '08 #3
missinglinq
3,532 Expert 2GB
"Travel time" is not Time as defined by Access! "Travel time" is the difference between one Date/Time value and another Date/Time value, and should be expressed as a Number.

Think about it; what would you do if you wanted to calculate the total "Travel time" for an employee for the conference? You'd multiply the "Travel time" by two. But you cannot multiply a Date/Time value by two!

As to whether to use hours or minutes, either use minutes (my preference) or hours and fraction of hours, i.e.

90 minutes

or

1.5 hours.

Using minutes makes it much easier doing calculations. You can always parse the minutes into hours and minutes , if need be, for display.

Welcome to Bytes!

Linq ;0)>
Aug 14 '08 #4

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

Similar topics

10
by: InvisibleMan | last post by:
Hi, Thanks for any help in advance... Okay, I have the JS listed below that calls for the display of the (DIV) tag... cookie function not included, as don't feel its necessary but you'll get the...
3
by: DaveC | last post by:
Hi.. I have a C exam in a few days.. Looking back at old exams I find a few things we have not been taught / cant remember being taught. Below is a question from last year. My question is how do...
21
by: Helge Jensen | last post by:
I've got some data that has Set structure, that is membership, insert and delete is fast (O(1), hashing). I can't find a System.Collections interface that matches the operations naturally offered...
1
by: Neo | last post by:
I have a table Contacts with a field "Male" which is of type Bit (SQL Server). I've got two radio buttons in a panel, & one of them is bound to the above field, (so that one can see if the contact...
0
by: Neo | last post by:
I have a table Contacts with a field "Male" which is of type Bit (SQL Server). I've got two radio buttons in a panel, & one of them is bound to the above field, (so that one can see if the...
13
by: Richard G. Riley | last post by:
In another thread it was pointed out that I'd made a booboo with strcpy : one that that I've, if I'm honest, made many times before. Not out of badness, just because since I first programmed C...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
1
by: Sideswipe | last post by:
I am trying to concatenate selected values from numerous radio button sets into 1 series and assign it to a single hidden field. I have never done javascript before and I continue to run into...
32
by: Stephen Horne | last post by:
I've been using Visual C++ 2003 for some time, and recently started working on making my code compile in GCC and MinGW. I hit on lots of unexpected problems which boil down to the same template...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.