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

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

$
0
0

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

 

 

DATEPART(Hour,W.U_totime) as "hour"

from [@TI_WIPHDR] W


Viewing all articles
Browse latest Browse all 2355

Trending Articles



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