Discussion Board for collaboration on QlikView Scripting.
I have a field called 'visit_last_action_time' which delivers me the exact user's time of last action, formatted as "hh:mm:ss" (e.g. "10:03:03")
Now I want to group these time stamps into Morning, Noon and Evening.
I tried the if function:
=if (visit_last_action_time > '12:00:00', 'Morning')
but it does not work properly, since the time stamps of different dates are not clustered together.
Can anyone help me?
Thank you so much in advance!
Go to Solution.
dual(timestamp(class(frac(visit_last_action_time ),480/(24*60)),'h:mm TT') & ' - ' & timestamp(class(frac(visit_last_action_time )+480/(24*60),480/(24*60)),'h:mm TT'), class(frac(visit_last_action_time ),480/(24*60))) as Betwen_HRS
View solution in original post
May be try this
If(Frac(visit_last_action_time) < MakeTime(12), 'Morning',
If(Frac(visit_last_action_time) = MakeTime(12), 'Noon', 'Evening')) as Period
I am assuming that till 11:59 AM, it is morning and 12 pm is Noon and after that is evening..... change these according to your needs
Thanks so much to you guys, both worked and gives me some great new insights :-)!!
Awesome, please close this thread by marking correct and helpful responses.
Qlik Community Tip: Marking Replies as Correct or Helpful