How do I specify a start and end date for my charts

I’d like to replicate the functionality of the energy dashboard which allows you to plot a sensor at historic dates. How can this best be done? Do I have to create a new sensor with timestamp<= end and >= start dates. If so how do I do that. OR can it be done on the fly within the dashboard as it appears to be done within Energy, to create a timeseries to plot. I guess it could also be done span in ApexCharts.

Newbie not sure where to go??

Alex thanks for this. Your card looks ideal. How do I make your card available in HA? Not familiar with GitHub. Presumably I download from there into HA?

Within HACS if I search for history card nothing appears

I’m sorry its just now appeared. I’ve rebooted a HAS a few times installing stuff perhaps that unearthed it.