Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

d4rlie891
New Contributor III

How to Get Duration in Minute

Hi,

Anyone can help me how to get the Duration in minutes ?

I want to get the duration in Minutes from Solved_Date_time - Start_Date_Time.

DateTime.jpg

Thanks

3 Replies
effinty2112
Honored Contributor

Re: How to Get Duration in Minute

Hi Darmawan,

                              Try:

=Interval(TimeStamp#(SOLVED_DATE_TIME) - TimeStamp#(START_DATE_TIME),'mm:ss')

which will give you the minutes and seconds.

If you just want minutes then:

=24*60*(TimeStamp#(SOLVED_DATE_TIME) - TimeStamp#(START_DATE_TIME)

Will give the minute which if you can round if needed.

Cheers

Andrew

Re: How to Get Duration in Minute

I think it would be good to read about how you can help Qlik Sense read your date fields correctly

Why don’t my dates work?

Get the Dates Right

Once you get your dates read correctly into Qlik Sense, you just need to use Interval function to get the values in Minutes

https://help.qlik.com/en-US/sense/3.0/Subsystems/Hub/Content/Scripting/FormattingFunctions/Interval....

d4rlie891
New Contributor III

Re: How to Get Duration in Minute

Thanks Andrew and Sunny,  from your information I can get the Minute with this formula :

24*60*(Timestamp(Timestamp#(SOLVED_DATE_TIME,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss') - Timestamp(Timestamp#(START_DATE_TIME,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss'))

Community Browser