Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Logistix
Contributor II
Contributor II

How to add minutes to my current time

Hello all, I'm pretty new to QlikSense and I need to add a variable to add 30 minutes to my current time. The problem is I found out two different ways for this:

Option1. 

 

LET vDate10min = Date(Now() - MakeTime(00,30),'DD/MM/YYYY hh:mm')

 

Option2. 

 

LET vDate10min = Date(Now() - 30/24/60,'DD/MM/YYYY hh:mm')

 

Both one returns me the same, in fact, I checked the result of  30/24/60 and Num(Maketime(00,30)) and it's the same too.

Can someone explain the second option? I don't understand why 30/24/60 is the same to Num(MakeTime(00,30))

Is it one way better than another?

Labels (3)
1 Solution

Accepted Solutions
brunobertels
Master
Master

hi 

30/24/60 help to convert numeric value into minutes time value

30 is the number of minutes you want to convert into time value that is divided by 

24 ( hours in a day) 

60 (minutes in an hour) 

So 

30/24/60 give 0.2 

if you use time(0.2) it will give 00:30:00 

then maketime(00,30) creates the same 00:30:00 

hop it helps

View solution in original post

1 Reply
brunobertels
Master
Master

hi 

30/24/60 help to convert numeric value into minutes time value

30 is the number of minutes you want to convert into time value that is divided by 

24 ( hours in a day) 

60 (minutes in an hour) 

So 

30/24/60 give 0.2 

if you use time(0.2) it will give 00:30:00 

then maketime(00,30) creates the same 00:30:00 

hop it helps