Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date

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?

9 Replies
MK_QSL
MVP
MVP

=Interval(Timestamp#(End_Date,'DD/MM/YYYY hh:mm')-Timestamp#(Start_Date,'DD/MM/YYYY hh:mm'),'hh:mm')

Anonymous
Not applicable
Author

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).

Not applicable
Author

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.

Not applicable
Author

Hi Michael Solomovich I would greatly aid your contribution, which could review the attachment?

Anonymous
Not applicable
Author

Not sure I understand the question...

The attachment has been waiting for your review for a few days already

Not applicable
Author

Sorry I was not clear, what I am saying is that there is an attachment, or where I can check that file?

ankitaag
Partner - Creator III
Partner - Creator III

He has already attached an application for you

vishalarote
Partner - Creator II
Partner - Creator II

=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')

vishalarote
Partner - Creator II
Partner - Creator II

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