SQL Server Performance

Converting Integer to hh:mm:ss

Discussion in 'T-SQL Performance Tuning for Developers' started by latingntlman, Jul 22, 2008.

  1. latingntlman New Member

    I'm trying to display an integer field as HH:MM:SS but I can only get the MM:SS to show. The HH part is being displayed as zero and I know there are hours. I'll explain below.

    The value for the Integer field (StaffTime) is 692238, which would translate to
    192h:17m:18s. However I can only get my syntax to display it as
    00h:17m:18s. Below is my syntax.

    HoursLogged = convert(varchar(14), dateadd(second, sum(c.ti_stafftime),0), 108)


    Can anybody shed a light as to what may be wrong with my code?

    thx,

    john
  2. techbabu303 New Member

    I guess you got your queries answered in other forum,
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=107133
    -sat
  3. latingntlman New Member

    Yeah, I did. You know, I've found that I rarely get reply/advise from this site.
    john
  4. satya Moderator

    Isn't that same you rarely post questions on this site?

Share This Page