Summing up amount from a bill

Hi,

I would like to create a sensor which would sum up monthly fuel bills.

I will scan a receipt, change to a text with Google keep and get it into HA with IMAP integration.

I am a bit lost what to do next. I would like to be able to scan the receipt at any time - I am sending date and amount. How can I utilize this data to show monthly expenses? Amount could be the entity state. But what should I do with the date?

Thanks in advance for any ideas,

regards,

Maciek