Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
300sss300
Creator
Creator

How to create 24 hr Time Field as Dimension???

Hi Guys!

I have following field in table. I want to create Field to be used as dimension in chart to see sales based on Time e.g 1am 2am to 12 am.

is there any way to do that?


"Date and Time is in single cell"

Transaction Date

1/1/2015 10:47

1/1/2015 22:24

1/1/2015 7:17

Thanks

sunindiaswuehlbrunobertelsyujiyamaneMarcoWedel

4 Replies
brunobertels
Master
Master

Hi

try this

Hour(Timestamp("Transaction Date",'DD MMMM YYYY hh:mm:tt')) as "Time",

Bruno

sunny_talwar

Try this in your chart:

LOAD [Transaction Date],

          Time(Frac([Transaction Date]), 'hh TT'), as Hour

FROM Source


Update: Assuming [Transaction Date] is read as a timestamp, if not then you will have to use TimeStamp#() function here

Time(Frac(TimeStamp#([Transaction Date], 'MM/DD/YYYY hh:mm')), 'hh TT') as Time

Assuming Transaction Date is MM/DD/YYYY, if it is DD/MM/YYYY, change the above (red) part to DD/MM/YYYY

300sss300
Creator
Creator
Author

Thanks !

300sss300
Creator
Creator
Author

Thanks!