473,569 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What Field Type & Function to determine Time

3 New Member
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 1628
hjozinovic
167 New Member
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
burtoncn
3 New Member
It worked! Thank you so much!
Aug 14 '08 #3
missinglinq
3,532 Recognized Expert Specialist
"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
54857
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 idea! function closeall() { var objs;
3
3942
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 you align values and define field widths in the printf function? I'm ok with the rest of the question. Thanks DaveC
21
13804
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 by Sets. - ICollection cannot decide containment - IList promises indexability by the natural numbers, which is not achievable (since i hash...
1
1848
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 is a Male of FeMale - determine or change the gender). Below is the coding. BUT, if i have a record where the Male field is "NULL", then all hell...
0
885
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 is a Male of FeMale - determine or change the gender). Below is the coding. BUT, if i have a record where the Male field is "NULL", then all...
13
2079
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 back in 1986 (and have done so for about 25 % of the time since then) or so I never really looked at the manpage for strcpy : this combined with K&Rs...
669
25640
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 paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 1990....
1
1689
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 problem after problem (object has no properties, undefined functions, etc.) So, I am really hoping someone can end the madness for me. Just so it's...
32
2700
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 issue. A noddy mixin layer example should illustrate the issue... class Base { protected: int m_Field;
0
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.