Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using the Interval() function with the format code 'd hh:mm:ss'. The result looks like 6 11:21:33
Is there a way to get 6 days 11 h 21 min 33 sec instead?
Thanks in advance!
Regards,
Florian
Yes, by creating a concatenated string with the single items:
=dual(
floor(Interval) &' days ' & hour(Interval) & ' h ' & minute(Interval) & ' min ' & second(Interval) & ' sec'
, Interval
)
Yes, by creating a concatenated string with the single items:
=dual(
floor(Interval) &' days ' & hour(Interval) & ' h ' & minute(Interval) & ' min ' & second(Interval) & ' sec'
, Interval
)
hi
yes like above post, use & operator for concatenate
There is no direct format code as of my knowledge.
May be something like this
LOAD Dual(%CustomFormat, RowNo()) AS %CustomFormat Inline [
%CustomFormat
days
h
min
sec];
=Concat(Aggr(Subfield(Interval(dateField, 'd|hh|mm|ss'), '|') & ' ' & %CustomFormat, %CustomFormat),' ',%CustomFormat)
OR
=Subfield(Interval(dateField, 'd|hh|mm|ss'), '|', 1) & ' days ' & Subfield(Interval(dateField, 'd|hh|mm|ss'), '|', 2) & ' h ' & Subfield(Interval(dateField, 'd|hh|mm|ss'), '|', 3) & ' min ' & Subfield(Interval(dateField, 'd|hh|mm|ss'), '|', 4) & ' sec'
Thanks! As there is no proper formatcode, swuehls approach seems to be the simplest alternative ...
Hi Swuehl,
Thanks for your easy wayaround to this problem.How ever I was wondering what is the need of 'Dual' here.Please explain and enlighten me.
Many thanks
Regards
Murali Krishna