当前位置:网站首页>How to get the difference between two dates rounded to hours

How to get the difference between two dates rounded to hours

2022-06-25 07:10:00 French red wine sweet

problem :

I'll illustrate what I would like to get in the following example: I will illustrate what I want in the following example :

'2010-09-01 03:00:00' - '2010-09-01 00:10:00'

Using TIMEDIFF() , we get 2 as a result. Use TIMEDIFF() , We get 2 result .This means, it's not considering the 50 minutes left. It means , It doesn't consider the rest 50 minute .

In this case, what I'd like to get is: 50 (minutes) / 60 = 0.83 period. under these circumstances , What I want is :50( minute )/ 60 = 0.83 cycle .Therefore, the result should be 2.83 and not 2. therefore , The result should be 2.83 instead of 2.


Solution :

Reference resources : https://stackoom.com/en/question/FC6K
原网站

版权声明
本文为[French red wine sweet]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202201234253058.html