'Calculate the total time taken from dates in multiple columns in Excel
Solution 1:[1]
Here is the answer and thanks to Scott Craner. I had tried different formulas like DATEDIF, IF etc and nothing worked. But the below formula suggested by Scott worked like magic!
=SUM(-A2,B2,-C2,D2) and format the cell to display time in hours and minutes [h]:mm.
enter image description here
Solution 2:[2]
strrep("_", 70) this is just a base R function
[1] "______________________________________________________________________"
Solution 3:[3]
print(paste(rep("_", 70), collapse = ""))
This works, but maybe there is a more elegant solution (it should also work without print())
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Merijn van Tilborg |
| Solution 3 | bt-koch |

