I am trying to check if anyone has already written some code to write out the duration of an interval as English text, such as in the following example:
Where durationstr shows what I want from duration. There is no difficulty with head on approach, but I don't want any zeroes of course and perhaps would like to see some human touch (like rounding 6 months to half a year perhaps?)
I am sure there must be something like this already written. If so, please give me a hint.
Thank you, Sergiy
Code:
clear all input str244 process str244 duration str244 durationstr "Sarah have been working for us" /// "02-07-03 02:00:00.000" /// "Two years, seven months, three days and two hours." "Sarah have been in love with Karl, our enigmatic chief designer" /// "02-07-03 01:30:00.000" /// "Two years, seven months, three days and an hour and thirty minutes." end label data "https://en.wikiquote.org/wiki/Love_Actually"
I am sure there must be something like this already written. If so, please give me a hint.
Thank you, Sergiy
Comment