Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a time bucket field to show a count of trades by hour on a bar graph.
time(ceil(udf_utc_cd, 1/24, 1/24)) as TimeBucket
I created the above field, however when I load my data it seems to somehow remember the date from the field and therefore shows the time multiple times across different days. The attached example is for trades on 06/06/2022 - 08/06/2022. I was hoping to show all trades at 8, 9, 10 etc rather than at 8,9,10 on each day.
The field udf_utc_cd is in format dd/mm/yyyy hh:mm:ss
Thanks for your help.
Daniel
You need to separate the floating-part, for example with:
time(ceil(frac(udf_utc_cd), 1/24, 1/24)) as TimeBucket
or maybe even easier:
hour(udf_utc_cd) as Hour
- Marcus