Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have two dates, namely start_date and end_date
and i have found a duration between them as
start_date end_date Duration
31-aug-2016 08:16:11 Am 31-aug-2016 08:17:11 Am 00:01:00
Here in that duration i want to display it has 00 hrs : 01 min : 00 sec
i want to add text as hrs : min : sec in that duration. pls help me know how to do that.
Thanks
subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 1) & ' hrs : ' &
subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 2) & ' min : ' &
subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 3) & ' sec'
subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 1) & ' hrs : ' &
subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 2) & ' min : ' &
subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 3) & ' sec'
You can make something like this:
date(floor(start_date), 'DD-MMM-YYYY') & ' ' & hour(time(start_date)) & 'hrs : ' & minutes(time(start_date)) & 'min : ' & seconds(time(start_date)) & ' sec' as start_date,
date(floor(end_date), 'DD-MMM-YYYY') & ' ' & hour(time(end_date)) & 'hrs : ' & minutes(time(end_date)) & 'min : ' & seconds(time(end_date)) & ' sec' as end_date
Best regards,
Data Architect MB
Thanks all for your solutions