Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3548

Re: how to substract 2 fields of "hour type"

$
0
0

select LEFT(

  CAST(datediff(Hour,W.U_frmtime, W.U_totime) AS VARCHAR(100)),

  LEN( CAST(datediff(Hour,W.U_frmtime, W.U_totime) AS VARCHAR(100)))- 2)

  +':' +RIGHT( CAST(datediff(Hour,W.U_frmtime, W.U_totime) AS VARCHAR(100)), 2)

from [@TI_WIPHDR] W


Viewing all articles
Browse latest Browse all 3548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>