Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
debimorr
Contributor
Contributor

Display current time in 12 hour format with AM/PM

Pivot Table with hours (3:00 pm) across the top and dates in the Column. My measure is the Count of ID, All of my numbers in the column are the same.

I have several lines of data with same date, I am trying to put the number of transaction into buckets of time.

Row = =(date(tdatetime))

Value (for time) =Timestamp(Floor([tdatetime], 1/24), 'h TT')

Measure = count(transid)

Any suggestions would be greatly appreciated.

Thank you

 

1 Solution

Accepted Solutions
rogerpegler
Creator II
Creator II

How about:

Row : Date(Floor(tdatetime)) 

This extracts the date component as number and displays it as a date

Column : =Round(Frac(DT)*24)

This will give you the hour (0 through 23). You can lay with the rounding to choose whether you want nearest (as above) or hour starting or hour ending.  If you want to display it as an time stamp then divide by 24 again and format it using the timestamp function.

View solution in original post

2 Replies
rogerpegler
Creator II
Creator II

How about:

Row : Date(Floor(tdatetime)) 

This extracts the date component as number and displays it as a date

Column : =Round(Frac(DT)*24)

This will give you the hour (0 through 23). You can lay with the rounding to choose whether you want nearest (as above) or hour starting or hour ending.  If you want to display it as an time stamp then divide by 24 again and format it using the timestamp function.

debimorr
Contributor
Contributor
Author

That is exactly what I was looking for. Thanks for responding so quickly.