Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mathematics with date.

Hi Experts,

In my script, I have created a field

Interval(num(Date1)-num(Date2),'ss') as Difference

which  gives me the difference between the two dates in seconds.

Using the same field I am writing an Expression:

=Sum(Difference)/3600   

which converts the sum of difference in dates to hrs.

But what I am getting is Num(Sum(Difference))/3600 which is not required.

How to solve this issue.

hic  please see if you can help me on this.

Regards,

Anjali Gupta

Labels (1)
12 Replies
PrashantSangle

Hi,

try interval(date1-date2,'D hh:mm:ss')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
thomaslg_wq
Creator III
Creator III

I don't understand what you really need but maybe :

as max dreamer says:

=Interval(date-date,'hh.mm.ss')

or

Round the hours and change the minutes with 60/100

=(ceil($(differencesecond)/3600))-1+(0.6-(ceil($(differencesecond)/3600)-($(differencesecond)/3600))*0.6)

Not applicable
Author

Thanks Jonathan for the help. I worked the way I wanted.