I have a scrape sensor and it returns a date as a string - “Mon, 01 April 2019”
Is the a way to convert this to a timestamp so I can use it in value templates ?
Thanks
I have a scrape sensor and it returns a date as a string - “Mon, 01 April 2019”
Is the a way to convert this to a timestamp so I can use it in value templates ?
Thanks
There IS a way :
{{ strptime(states("sensor.sensor_name"), "%a, %d %B %Y") }}
Thank you so much, worked like a charm with a few additions to get the difference between that and now