format date

I need to convert a date that is in the format yyyy-mm-dd hh: mm: ss to dd-mm-yyyy hh: mm: ss, but all the functions I tried to use in lookerML have failed. Can someone help me?
Thanks

Juliana Martins dos Santos

0 1 962
1 REPLY 1

In cases like this I usually resort to using Liquid. Have a look if this could help:

https://help.looker.com/hc/en-us/articles/360023800253-Easy-Date-Formatting-with-Liquid

You could then use the following:

dimension: date_formatted {
sql: ${created_date} ;;
html: {{ rendered_value | date: "%d-%m-%y %h:%M:%s" }} ;;
}
Top Labels in this Space
Top Solution Authors