Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Not applicable

Few hours between two dates ?

Let me add the hours between two dates, two dates are formatted as follows :

DD / MM / YYY hh : mm : ss PM

How I can do it in the script?

Many thanks in advance.

: )

Tags (4)
1 Solution

Accepted Solutions

Re: Few hours between two dates ?

‌Interval(Timestamp#(enddatetime, 'DD / MM / YYYY hh : mm : ss TT')-Timestamp#(startdatetime, 'DD / MM / YYYY hh : mm : ss TT'), 'hh')

5 Replies
MVP
MVP

Re: Few hours between two dates ?

date2 - date1

then you can format in number tab          EDIT: ops, didn't read is Qlik Sense

Re: Few hours between two dates ?

You want to add them or subtract them???

Re: Few hours between two dates ?

‌Interval(Timestamp#(enddatetime, 'DD / MM / YYYY hh : mm : ss TT')-Timestamp#(startdatetime, 'DD / MM / YYYY hh : mm : ss TT'), 'hh')

Not applicable

Re: Few hours between two dates ?

Thank you very much everyone for your contribution , i wanted is to add few hours between certain times ....

It works perfect with your contribution Marco.

Thousand thanks:)

Re: Few hours between two dates ?

You're welcome.

regards

Marco