Posts by Fredguapo • 123 points
2 posts
-
1
votes5
answers64148
viewsA: Difference between two dates in days, hours, minutes and seconds
I found this solution to the problem of hours: CONVERT(VARCHAR, ABS(DATEDIFF(SECOND, 2013-11-29 11:30:40.157, 2014-05-27 14:10:50.637) / 60 / 60 / 24)) + 'd ' + RIGHT('00' + CONVERT(VARCHAR,…
-
11
votes5
answers64148
viewsQ: Difference between two dates in days, hours, minutes and seconds
Problem: How to subtract between two dates and return the value in Days, Hours, Minutes and Seconds in an SQL query with SQL Server 2014? Example: Dados: DataRecebimento DataEnvio 2013-11-29…