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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Valueloop to Time Format

Hello Qlikers,

I need to convert

=Valueloop($(Start), $(End), $(Step))

into time format...

I tried with Time# and Time combination but no success...

Any suggestion?

11 Replies
Kushal_Chawda

I am not sure but you can try this

=Valueloop(frac(time#('$(Start)','hh:mm:ss')), frac(time#('$(End)','hh:mm:ss')), 1)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

A step of 1 would mean steps of 1 day. Perhaps a different interval is more useful: hour - 1/24, minute - 1/1440, second - 1/86400


talk is cheap, supply exceeds demand
Kushal_Chawda

Yeah gwassenaar‌.  thanks for correction

Anonymous
Not applicable
Author

Kush,

I have already tried like what you suggested but thing is what when

I use inside valueloop() it gives me blank '-'

Anonymous
Not applicable
Author

Did not work...

Attaching the Sample....

Need Value as per Slider Time in Straight table instead of numeric value in Valueloop Sheet

marcus_sommer

AFAIK there is no way to format a valueloop which required always pure numeric values. I have earlier tried some things even with $-sign expansion and dual-functions but nothing seems to work. Easier is to emulate this with normal date/time-fields, see the example within the attachment.

- Marcus

Anonymous
Not applicable
Author

Marcus,

Thanks for clearing on Valueloop formatting!!

In my scenario, Customer is looking for 11:30 - 11:30 window where

11:30 - 23:59 represent current selected date data for 2nd half

00:00 - 11:30 represent next date of current selected date for 1st half


From my earlier post, Bill gave me almost what I am looking for with your inputs but it is with Field Value......(see the attached)


I want same in ValueLoop sheet but with the Custom slider option..

Any other way instead of using Valueloop(), Can I get functionality like Class() with Custom slider option?



Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The class function works, but the problem is that your first time doesn't start at exactly a half hour interval. But perhaps a better solution is to create a new time field in the script based on for example half hour intervals:

Time(Floor(T_SEG, 1/48),'hh:mm') as T_SEG_30MIN_INTERVAL


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Meanwhile I am trying on your suggestion with simple date/time fields, will let you know if it works