Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. MySQL
  4. sql function to calculate total work hours in a day

sql function to calculate total work hours in a day

Scheduled Pinned Locked Moved MySQL
helpdatabase
1 Posts 1 Posters 18 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Athira G Krishnan
    wrote on last edited by
    #1

    :(( :(( If the shift time of an employee is 7pm to 3am.for eg: The following is my output.Actually the second time out is 1:32.But after 12 am,it will be considered as next day..so 11:59pm is timeout..and also the next time in shows 12:01am..Both are ok..But the problem is that, the time between 11:39 and 1:32 will be added to the work hour of next day.. ie:that time will be added with 2:1:0.Pls help me to write the sql function for this. Time in Time Out Work hrs Sep 10 2010 7:23:35:000PM Sep 10 2010 9:43:23:000PM 2:19:48 Sep 10 2010 9:45:12:000PM Sep 10, 2010 11:59:59:000PM 2:14:47 Sep 10, 2010 12:01:00:000AM Sep 10 2010 9:10:12:000PM 2:1:0

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups