Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon!
I need your help, I have to perform a subtraction of hours of two fields that are start_date and end_date , the dates are in the format DD / MM / YYYY HH : MM , subtraction of those fields that I do is just a work period 8 am to 5 pm ... How I can do to make this subtraction and take only that range of time?
=Interval(Timestamp#(End_Date,'DD/MM/YYYY hh:mm')-Timestamp#(Start_Date,'DD/MM/YYYY hh:mm'),'hh:mm')
I've answered a similar question recently. See attached file.
(The work hours there from 8 am to 6 pm, it is defined in script lines 12 and 13, you can change as needed).
Hi Manish Kathia, thank you very much for the help, but the ranges shown me comes out even 24 hours, the range I need is only 8 am to 5 pm.
Hi Michael Solomovich I would greatly aid your contribution, which could review the attachment?
Not sure I understand the question...
The attachment has been waiting for your review for a few days already
Sorry I was not clear, what I am saying is that there is an attachment, or where I can check that file?
He has already attached an application for you
=Timestamp(timestamp(Timestamp#(startdate,'DD/MM/YYYY hh:mm:ss TT'),'hh:mm TT')-timestamp(Timestamp#(enddate,'DD/MM/YYYY hh:mm:ss TT'),'hh:mm TT'),'hh:mm TT')
sorry replace startdate to enddate
=Timestamp(timestamp(Timestamp#(enddate,'DD/MM/YYYY hh:mm:ss TT'),'hh:mm TT')-timestamp(Timestamp#(startdate,'DD/MM/YYYY hh:mm:ss TT'),'hh:mm TT'),'hh')&' Hr'
it will show 09 Hr