当前位置:网站首页>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边栏推荐
猜你喜欢
活动报名|Apache Pulsar x KubeSphere 在线 Meetup 火热来袭
Pratique de gestion hiérarchique basée sur kubesphere
Modify the default log level
R & D thinking 07 - embedded intelligent product safety certification required
【他字字不提爱,却句句都是爱】
In depth analysis of Apache bookkeeper series: Part 3 - reading principle
Streamnational platform version 1.5 is released, integrating istio and supporting openshift deployment
The significance and proof of weak large number theorem
3dmax软件的制作木桶过程:三步流程
Cloning and importing DOM nodes
随机推荐
Kubernetes core components etcd details
燕京啤酒何以至此?
1W字|40 图|硬核 ES 实战
Practice of hierarchical management based on kubesphere
Efficient exploration | an application practice of ES geographical location query
3dmax软件的制作木桶过程:三步流程
ES can finally find brother Wukong!
[ACNOI2022]王校长的构造
[从零开始学习FPGA编程-43]:视野篇 - 后摩尔时代”芯片设计的技术演进-2-演进方向
Clearing Magento log data - clearing Magento log data
Cloning and importing DOM nodes
Common cluster scripts
直接选择排序和快速排序
Acwing2013. three lines
Derivation of sin (a+b) =sina*cosb+sinb*cosa
We are different
CTFHub-Web-信息泄露-目录遍历
Streaming a large file using PHP
活动报名|Apache Pulsar x KubeSphere 在线 Meetup 火热报名中
Uncaught TypeError: Cannot read properties of undefined (reading ‘prototype‘)