@samtwilliams wrote:
Hi All,
I’ve got a sensor pulling using restful, the value returned is a date format as follows
“2020-01-01”I want to convert it to “01/01/2020” style but can’t get the custom date format to work, any ideas? It just returns “none”
{% set date = states('sensor.grey_bin') | regex_replace(find='"', replace='', ignorecase=False) %} {{ as_timestamp(date) | timestamp_custom("%d/%m/%y", True) }}
n.b. the data comes back with double quotes hence the strip.
Posts: 18
Participants: 4