Forum Discussion
android1
Post Patron
10 years agoCount occurrence of time
Hi I have 2 columns in date time format which show appointment times.
I need to count the number of times an appointment occurs between 7am-8am etc.
I would like not to have to change the format to time if possible.
android1 Create calculated column as below replacing 'sam' with your table name. Then use sum of new column to get count of times where time is between 7 and 8.
Column = IF(HOUR(sam[timefrom]) >= 7 && HOUR(sam[timeto]) <= 8,1,0)
2 Replies
- ankitpatira
Community Champion
android1 Create calculated column as below replacing 'sam' with your table name. Then use sum of new column to get count of times where time is between 7 and 8.
Column = IF(HOUR(sam[timefrom]) >= 7 && HOUR(sam[timeto]) <= 8,1,0)
- android1
Post Patron
Thank you. Does exactly what I need.