Get result based on working hours

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    #1

    Get result based on working hours

    Hi

    my problem currently is that i need to get database on working hours(7am-5pm)

    so lets say a order lies in the database for e.g 4 days
    if i just get like timediff i will end up 96 hours where in fact it was just lying there for 28 hours

    Any help will be appreciated
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    First, create a function to get the business hours in between two datetimes (the order datetime and the current datetime)

    Second, do a datediff between order date and current datetime.

    Then subtract the two numbers...

    Good Luck!!!

    ~~ CK

    Comment

    Working...