471,887 Members | 1,077 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

Small problem with DateType

I have simply query:
SELECT time_start-time_end
FROM table1
WHERE [.......]

When I run this query, then I see:
1900-01-01 00:38:00.000
1900-01-01 03:43:00.000
1900-01-01 03:02:00.000
1900-01-01 04:31:00.000

I want to get sum of all this dates and times. How Can I do this?

Best regards
BUSHII
Jul 20 '05 #1
1 1303
SELECT SUM(DATEDIFF(S,time_start,time_end)) AS total_seconds
FROM Table1

--
David Portas
SQL Server MVP
--
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jason Heyes | last post: by
74 posts views Thread by lovecreatesbeauty | last post: by
4 posts views Thread by =?Utf-8?B?VzFsZDBuZTc0?= | last post: by
169 posts views Thread by JohnQ | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.