Difference between dates

前端 未结 3 423
不知归路
不知归路 2021-01-24 08:45

I want to calculate the difference between two times, one of which is the current time, and the other is just in the format HH:MM, always in the future.

If I just subtra

3条回答
  •  长发绾君心
    2021-01-24 09:16

    You can simply convert both dates to timestamp, do the calculations and convert it to required format, i.e. days, hours and minutes. it's quite simple.

提交回复
热议问题