Logging on hours basis

Hello
I ask if it is somehow possible to have a recording of consumption divided by time slots and / or days of the week.
This is to be able to calculate the monthly costs based on the energy costs in the different time slots.
Thanks