Extract datetime range data from sensor

I did the same today, exported as CSV file, using a custom HACS history card.