Get difference between two dates in seconds

Assuming you’re going for human-readable, I would do this.

julia> Dates.canonicalize(Dates.CompoundPeriod(Dates.DateTime(date2) - Dates.DateTime(date1)))
6 minutes, 23 seconds
2 Likes