Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

group time into hours

Hi, I have a variable that displays 'YYYYMMDD hh:mm', but I only need the hours so that I can display it in a chart axis. I've tried 'time(Timestamp#(fieldname,'YYYYMMDD hh:mm'),'hh:00') as newVarName' but I got

Untitled8.png

How can I group them into only 1 of each hour? Thanks.

3 Replies
MVP
MVP

Re: group time into hours

Try with hour(), like:

hour(Timestamp#(fieldname,'YYYYMMDD hh:mm')) as newVarName

Re: group time into hours

Hi

Try

hour(fieldname) as Hour

Regards

ASHFAQ

er_mohit
Honored Contributor II

Re: group time into hours

Try this

Interval(Timestamp#(fieldname,'YYYYMMDD hh:mm'),'hh')  as Hour

Community Browser