Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Question

Status
Not open for further replies.

coolkake

Technical User
Apr 5, 2002
51
CA
Hi all

I'm making a datbase for service and in a form I want to be able to have the star time and end time of the service call.

I am thinking of having the start and end dates have a format of general date and then have the total time displayed in minutes (or hours) and I want that value to be added to the table. Is this possible? Or if someone have a better way of doing this please let me know.

Thanks
 
I would create the BegDateTime and EndDateTime fields formatted in the raw table as:

Date/Time General Date

This includes date AND time, provided that your Regional Settings are formatted as such.

HTH Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

"No need to send gifts, just send a smile."
 
Thanks Roy

Can you tell me what formula I would use to come up with a total time for BegDateTime and EndDateTime fields? I can't seem to get it to work.

Cheers
 
I may not be totally clear on what you're trying to do... but I would probably set up 3 fields. One field would be your Date field. Then you would have a BeginTime and an EndTime field where you could enter your times. To find the total time, you simply subtract BeginTime from EndTime. In order to get it in minutes or hours or seconds, depending on how you wnat it, you may have to multiply your result by 60 or 24, for example:

StartTime = 4:21:00 AM
EndTime = 5:23:00 PM
Total Time = (EndTime - StartTime)*60*24 = 782 minutes

This is just one option... I'm sure there are many ways to do this.

Good luck,
ejc
 
OK, got that to work. Now how do I get this total to be displayed in the form and also have it enter in to the table at the same time?

Thanks a lot for everyone's help, I'm learning more all the time because of this Forum [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top