Hello guys
I have a table that contains the start time and end time.
I want a function that calculates the eight hours after the beginning of time, meaning that if the start time field time is 8:00 end time field is 16:00
thanks for help
Hello guys
I have a table that contains the start time and end time.
I want a function that calculates the eight hours after the beginning of time, meaning that if the start time field time is 8:00 end time field is 16:00
thanks for help
These are Date/Time, not text, type fields?
Try DateAdd() function.
However, adding 8 hours would return 4:00:00 PM which is 16:00 hours.
Use Formatting to display as 24-clock time.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks very much June
Well, but what is the function. Is it used in a query?
Do you delete the end of time field in a table?
It does not matter what kind of time, 12 or 24
thank you my friend
It's an intrinsic function. Search Access Help or web for details on using it.
It can be used in query or textbox or code.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
In Access, the date field is really a number (of days), if you want to add 8 hours, simply add 8/24.
If you want to update all rows so your end time is 8 hours after the start time, you can do this:
Code:UPDATE WhateverTableName SET endTime = startTime+(8/24)
Why do you need to store EndTime if it is always StartTime + 8 hours?
It can always be calculated.
thanks friends
Thank you orange
What I want is to do my later by making all eight hours of vacation is one day.
An example of this one person to the total hours are 16 hours = 2 and so on.
If you want to use this to give vacation time, you should not make EndTime = StartTime + 8 hours. You should keep EndTime as the actual time that the employee's shift ended. Then later do:
Code://Psudocode: TimeWorked = EndTime - StartTime ExpectedWorkHours = 8 VacationHours = ExpectedWorkHours - TimeWorked.
If EndTime is always StartTime+8, then you don't know how long they worked!
Thank you bigot