I have a view in Looker which has a dimension Sales date with datatype as String and it is in the format DD-MM-YYYY. I need to convert it into a date datatype having format YYYY-MM-DD.
Depending on your database & dialect you can search for functions that would parse your string date with expected format and then would return the data as date type. In BigQuery those are PARSE_DATE() or PARSE_TIMESTAMP()