Totals are only caused by a field, not part of a field. That’s why you compare it to an integer that is the field number from the table.
You can look into using the Date virtual table for this. If you want to use the grouping functionality built into reports that will be your best bet. Date will be one data item, and something else will be indented beneath it. You’ll have to set your filters manually, though.