Forum Discussion
krish86
Aug 23, 2021Copper Contributor
How to filter in excel power query between two time intervals
Please can you help on this, I want to group this date modified into three different groups like, from 6.00 am to 1.59pm and 2.00pm to 9.59pm and 10.00pm to 6.00am
JKPieterse
Aug 23, 2021Silver Contributor
krish86 Here is one way by using a calculated column. The trick I used is to first add 6 hours to the date+time so your periods start at midnight. Then divide by 3 and take the integer of that so we get three "periods" of 8 hours in a day and finally, subtract the six hours again to shift the time back to its "original" period. See attached.