질문하기질문하기
 

질문convert minutes to hours

  • 2006년 2월 24일 금요일 오후 3:26esin gülten 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    hi,

    I want to convert minutes to hours. for example field_minutes=130minutes to 2:10 hours...

    select field_minutes from table---> how can I do?

     

모든 응답

  • 2006년 2월 24일 금요일 오후 3:42Jamie ThomsonMVP, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Not sure what this has got to do with SSIS but its an interesting little puzzle for a Friday afternoon anyway.

    Paste the following into SSMS/QA and run it:

    declare @mins int

    set @mins = 130

    select cast(@mins/60 as varchar(5)) + ':' + RIGHT('0' + cast(@mins%60 as varchar(2)), 2)

     

    There are probably other, better, ways!!!

     

    -Jamie