How to extract Hour of Day of an event
I'd like to produce a histogram-style chart that shows how many occurrences of an event there are in each hour of the day, over whatever range of time, e.g. if an event only occurs at 13:05 and 13:56 each day, then if I look at the current day only, then I would expect to see the bar for 13:00:00 to 13:59:59 have a value of 2 and all others 0. If I expanded the date range to include yesterday and the day before, I would expect the bucket for 13:00 to 13:59 to count 6, etc.
It doesn't look like there is a way to access elements of the datetime, e.g. day, day of week, month, year, hour, minute, second? (Converted to my local timezone of course).
Posted by James Webster over 3 years ago