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. how i can add two diffrent time

how i can add two diffrent time

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelpquestion
3 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.
  • S Offline
    S Offline
    syed saba
    wrote on last edited by
    #1

    Hi, I am using sql server 7.0 in that i am having a table of 3 feild i.e. empName, Logindate, HoursWorked select * from tablename Result: empName LoginDate HoursWorked ------- ------------ ------------ Amit 06/03/04 13:44:45 Amit 06/04/04 14:44:45 now i want the sum of the field "HoursWorked" Can any body help?

    S 1 Reply Last reply
    0
    • S syed saba

      Hi, I am using sql server 7.0 in that i am having a table of 3 feild i.e. empName, Logindate, HoursWorked select * from tablename Result: empName LoginDate HoursWorked ------- ------------ ------------ Amit 06/03/04 13:44:45 Amit 06/04/04 14:44:45 now i want the sum of the field "HoursWorked" Can any body help?

      S Offline
      S Offline
      Steven Campbell
      wrote on last edited by
      #2

      Your results are a little confusing. What is the data type of HoursWorked?

      S 1 Reply Last reply
      0
      • S Steven Campbell

        Your results are a little confusing. What is the data type of HoursWorked?

        S Offline
        S Offline
        syed saba
        wrote on last edited by
        #3

        Actually im taking 'LoginTime' and 'LogoutTime' Datatype 'DateTime' from "login" table and subtraction of this two field is strored in field 'TimeDiffrence' datatype varchar Query i m using is "convert(varchar(8),(logoutTime-loginTime),14)Timediffrence" now i want the sum of the field "Timediffrence"

        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