IIF( (HOUR( TTOD( Table1.datecreation)) >=0 AND HOUR( TTOD( Table1.datecreation)) <= 11), "0-12", IIF( (HOUR( TTOD( Table1.datecreation)) >= 12 AND HOUR( TTOD( Table1.datecreation)) <= 15), "12-16", "16-24")) as HourBlockData contains hours in all the range 0-24. So I should have some "12-16" and "16-24"