Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:21:41+00:00 2026-06-10T20:21:41+00:00

I have a table tblTimesheet in which I store user timing hours, like this:

  • 0

I have a table tblTimesheet in which I store user timing hours, like this:

Hours
4.01
3.44
0.05
0.04
2.40

What I want is some of these time periods I am using this

select sum(hours) from tbltimesheets
where workDate='2012-08-30 00:00:00.000' and taskid in (86,3,34)

but it’s giving me 9.94, and I want to get it like 10.34; the datatype is decimal of this field.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:21:43+00:00Added an answer on June 10, 2026 at 8:21 pm

    How about something like

    DECLARE @Table TABLE(
            Hrs FLOAT
    )
    INSERT INTO @Table SELECT 4.01 
    INSERT INTO @Table SELECT 3.44 
    INSERT INTO @Table SELECT 0.05 
    INSERT INTO @Table SELECT 0.04 
    INSERT INTO @Table SELECT 2.40
    
    ;WITH Vals AS (
            SELECT  SUM(FLOOR(Hrs)) NumHrs,
                    SUM((Hrs - FLOOR(Hrs)) * 100) NumMins 
            FROM    @Table
    )
    SELECT  NumHrs + FLOOR(NumMins / 60) + ((NumMins / 60 - FLOOR(NumMins / 60)) * 60 / 100)
    FROM    Vals
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table like this: +------+-------+ | user | data | +------+-------+ | 1
I have table in which I am inserting rows for employee but next time
I have table and this table contain result column with some entries. I just
I have table called Direccion other called Cliente each one defined like this public
I have table field defined as like this approved_at DATETIME YEAR TO SECOND NOT
I have table in an MS Access database that looks like this: ID Symbol
I have table like below ID User Date Location 1 Tom 6-Mar-2012 US 2
I have table (call it my_table ) that can be simplified like this: NAME,
I have table structure like this: ID cond 1 5 1 2 1 6
I have table data like this id id1 name 1 1 test1 1 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.