Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning all,
I would like to calculate time difference between start_date_time and end_date_time the duration should be form 'hh:mm:ss' and thereafter I need calculate the total time per CallCentre, Desk, Team_Lead and Agent_Name in a pivot table. I have tried the following expression: =interval( end_date_time - start_date_time, 'hh:mm:ss'), but it bring back blanks. Not sure if I have to calculate it on the script level or expression !
Make sure your timestamps are really timestamps and not strings. Use the Timestamp# function if necessary (in the script preferably) to turn strings into timestamp values.
Make sure your timestamps are really timestamps and not strings. Use the Timestamp# function if necessary (in the script preferably) to turn strings into timestamp values.
You can refer Calculate Working Hour Interval Between Two Dates
Hi Moses,
Try like below:
In the Expression:
Time(end_date_time ) - Time (start_date_time)
As @gwassenaar
said make sure that ur timestamp should be in timestanp.
Still if u have any issue then plz try to share some sample data along with output.
i Hope this helps you.
-Nagarjun
Hi,
Try:
Interval((Interval(end_date_time, 'hh:mm:ss') - Interval(start_date_time, 'hh:mm:ss')), 'hh:mm:ss')
Thank you, it worked
should I use it as an expression or in script?
Thank you for the assistance
Try
In the script:
timestamp(end_date_time,'MM/DD/YYYY hh:mm:ss') as end_date_time,
timestamp(start_date_time,'MM/DD/YYYY hh:mm:ss') as start_date_time
Expression:
Interval((Interval(end_date_time, 'hh:mm:ss') - Interval(start_date_time, 'hh:mm:ss')), 'hh:mm:ss')
Thank you, I have tried and it also worked.