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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to handle time calculations with PM and AM next day transactions 1

Status
Not open for further replies.

Pack10

Programmer
Joined
Feb 3, 2010
Messages
495
Location
US
I am buiding a time on routine, we want to show how many hours something has been on the database until it is closed out, for instance if an item gets assigned at 5 PM the previous day that is hour 17....and the next day at 8 AM my calculation shows -8, when it is really 15 hours.
how can I show the number of hours it has been on the system.
 
I expect the datediff function is what you want. You just need to be sure to pass it date and time together with the correct parameter of hour.
 
Worked like a charm,...thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top