Google Answers Logo
View Question
 
Q: calculate sum of time in SQL server ( No Answer,   0 Comments )
Question  
Subject: calculate sum of time in SQL server
Category: Computers > Programming
Asked by: mrgooglelover-ga
List Price: $15.00
Posted: 05 Sep 2002 08:06 PDT
Expires: 17 Sep 2002 06:52 PDT
Question ID: 61918
how to calculate sum of time in SQL server ?

Request for Question Clarification by answerguru-ga on 05 Sep 2002 08:47 PDT
Hi mrgooglelover-ga,

Could you describe what you are trying to do in a little more detail?
Do you have two time values stored that you are trying to sum?

Thanks,

answerguru-ga

Clarification of Question by mrgooglelover-ga on 05 Sep 2002 09:55 PDT
I have a table that I need to calculate the sum of each of it's
columns and then output results to a report through a view. so I want
to do this operation in the view itself. but one of the columns is a
time format and I cant use the normal sum() function to find the
summation of that time column's values. even in the Crystal reports,
the 'running total' function will not work for the time data types.

Request for Question Clarification by joseleon-ga on 05 Sep 2002 12:38 PDT
Hello:

Could be this the same problem you have?

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&frame=right&th=6106bb2c41935866&seekm=3b277fa2_3%40news3.prserv.net#link1

Regards.

Clarification of Question by mrgooglelover-ga on 06 Sep 2002 21:53 PDT
yes it is the same of my case

take this example

if x = 06:35 , y = 12:50 then x + y = 19:25

Request for Question Clarification by joseleon-ga on 14 Sep 2002 04:44 PDT
Hello:
 I don't have a license of SQL Server available, but after some
research I think this might work:

select total=CONVERT(datetime, SUM(CONVERT(float, timecolum))) from
yourtable

Could you, please, try this solution to see if works?

Regards.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy