Calculating total number of Hours, Days, Minutes and Seconds between two dates in Golang
To get the number of days between two dates, we can calculate the number of days from the beginning 0/0/0000 to the first date and the second date and compute their difference. Examples: Input: 2020-04-27 23:35:00, 2018-5-12 12:43:23 Output: 716 days, 10 hours, 51 minutes, 37 seconds Input: 2014-02-