Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • So you just have as far as I made it? No more insightful or targeted methods, just doing some manual division per unit range, and this example only goes up to hours, which is ok in some of my cases. Commented May 18, 2017 at 18:44
  • 2
    It seemed to me that your beef was not getting to-the-second granulairity and not wanting the "duration" to be a random date in the distant past; I showed you how to get it? If this isn't what you're looking for, perhaps make your question more clear about what you want with respect to given input and desired output. Commented May 18, 2017 at 18:50
  • I expressed that datediff from the other answer gave me an answer in days, where I want more unit in addition to that without truncating. I have the seconds value as demonstrated in that answer, and now I am curious if there are other ways to format the duration more naturally rather than having more manual steps of calculations to split the values apart, as per my final paragraph. Commented May 18, 2017 at 18:56