469,167 Members | 1,334 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

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
Jul 20 '05 #1
1 1275
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
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.