Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

mwallman
Contributor

How to calculate the EnquiryEndTime based on EnquiryDateTime + Duration field?

Hello all,

I have some sample data that looks like this:

   

EnquiryIDCallDateTimeEnquiryDuration(Seconds)
232323232322/06/2017 23:32:57254.8

I need to calculate the end time based on the two fields above.

The EnquiryDuration field values range from a few seconds to hours.

How can I calculate and add the EnquiryDuration value to the CallDateTime field and create a CallEndTime field please?

1 Reply
MVP
MVP

Re: How to calculate the EnquiryEndTime based on EnquiryDateTime + Duration field?

=Date( CallDateTime + ( EnquiryDuration / 86400 ) , 'DD/MM/YYYY hh:mm:ss')

86400 is the number of seconds that there is in a full day when it comes to how datetime values do math.

From the online Qlik Sense help manual pages:

Date and time values are based on a date-time serial number that equals the number of days since December 30, 1899. The integer value represents the day and the fractional value represents the time of the day.


Read more here: Date and time functions ‒ Qlik Sense