Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Crystal Reports or SQL formula to convert decimal time to HH:MM:SS

$
0
0

I am NOT a SQL Guru, I can spell SeekWul and that's about it.

However, I am trying to calculate the difference between two times, and then output the result in the format HH:MM.

Currently I have:

Dim d1, d2

d1 = {MCRSLT_TBL.START_DATE}
d2 = {MCRSLT_TBL.END_DATE}
formula = DATEDIFF("n",d1,d2) / 60

I figured out how to calculate the difference but it shows 8:18:35 as 8.32

How can I get the correct result? I want to show the run-time of some equipment as HH:MM:SS instead of decimal.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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