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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Get Hours and minutes form reload time.

Hi I want to get hours and minutes from reload time.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can create variables in the script that contain these values:

LET vHour = Hour(ReloadTime());

LET vMinutes = Minute(ReloadTime());

LET vTime = Time(Frac(ReloadTime(),'hh:mm:ss'));

Or use an expression in for example a text box: =Hour(ReloadTime()) & ' hours and ' & Minute(ReloadTime()) & ' minutes'


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can create variables in the script that contain these values:

LET vHour = Hour(ReloadTime());

LET vMinutes = Minute(ReloadTime());

LET vTime = Time(Frac(ReloadTime(),'hh:mm:ss'));

Or use an expression in for example a text box: =Hour(ReloadTime()) & ' hours and ' & Minute(ReloadTime()) & ' minutes'


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

Just take care that using above script snippet is returning the reload time of the reload time of the previous script run, not the current.

If you want to create variables that return the current reload time in the UI:

SET vHour = '=Hour(ReloadTime())';

SET vMinutes = '=Minute(ReloadTime())';

Or if you want to use the current reload time in the script itself, use Now(1):

Let vHour = Hour(Now(1));

Let vMinute = Minute(Now(1))