Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 49590

Re: formatting time value to hh:mm:ss

$
0
0



 

Try a DAX as below.

fmtCol = 
RIGHT ( "0" & INT ( TableName[Duration] / 3600 ), 2 )& ":"& RIGHT (
        "0"& INT ( ( TableName[Duration] - INT (TableName[Duration] / 3600 ) * 3600 ) / 60 ),
        2
    )& ":"& RIGHT ( "0" & MOD (TableName[Duration], 3600 ), 2 )

Or deal with the format in query.

select Duration, convert(varchar(10),DATEADD(second,Duration,0),108) fmtSecs from t1

Capture.PNG 


Viewing all articles
Browse latest Browse all 49590

Trending Articles



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