You are here: Re: Time Over 24 Hours « MsSQL Server « IT news, forums, messages
Re: Time Over 24 Hours

Posted by markc600 on 04/18/06 11:07

Rather than using CONVERT, you can get the number
of hours, minutes and seconds using this

Hours = OutgoingCallDuration / 3600
Mins = (OutgoingCallDuration % 3600) / 60
Seconds = OutgoingCallDuration % 60

Your statement will end up like this

RIGHT('00'+CAST((SUM(ISNULL(Calls.OutgoingCallDuration,0))/3600) AS
VARCHAR(2)),2) +
RIGHT('00'+CAST(((SUM(ISNULL(Calls.OutgoingCallDuration,0)) % 3600) /
60) AS VARCHAR(2)),2) +
RIGHT('00'+CAST((SUM(ISNULL(Calls.OutgoingCallDuration,0)) % 60) AS
VARCHAR(2)),2)

You may find it more efficient to do this in your front end

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация