Plz help with history stats by days

Hello everyone, I build a bed sensor with esp32 and SF15, I made a template that show me how many hours I slept at last night (from 14:00 - 19 hours ago) and how many hours my wife slept, I want to make history by a day, for example, every day at 14:00 he will sample the value or maybe other way, I want to make table with the days on the week and show me how I slept every day last week