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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. sql function

sql function

Scheduled Pinned Locked Moved Database
databasequestion
2 Posts 2 Posters 0 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.
  • T Offline
    T Offline
    Thanusree Duth
    wrote on last edited by
    #1

    I have created sql function and stored procedure to calculate work hours of an employee. timein,timeout,workingHours are the fields. eg: TimeIn TimeOut WorkingHours 9:20:00 AM 11:59:59 PM 14:39:59 00:01:00 AM 3:56:40 AM 3:55:40 I calculated workHours using datediff.I have to calculate the sum of WorkingHours also.What can I do for this??Really I m confused..:confused:

    B 1 Reply Last reply
    0
    • T Thanusree Duth

      I have created sql function and stored procedure to calculate work hours of an employee. timein,timeout,workingHours are the fields. eg: TimeIn TimeOut WorkingHours 9:20:00 AM 11:59:59 PM 14:39:59 00:01:00 AM 3:56:40 AM 3:55:40 I calculated workHours using datediff.I have to calculate the sum of WorkingHours also.What can I do for this??Really I m confused..:confused:

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Did you try SUM function to get sum of working hours. example: select sum(workinghours) from mytable Or post your query and we will see how concretely to add too sum of working hours.


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

      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