This should help: https://community.home-assistant.io/t/timestamp-into-string-variable/175432/3?u=blackway