Question: I have a `varchar` column where some values are in `mm/dd/yyyy` format and some are in `yyyymmdd`. 

I want to convert all `mm/dd/yyyy` dates into the `yyyymmdd` format. What is the best way to do this? Thanks

Table is `Employees` and column is `DOB`

Answer: 
try this....

```
SELECT FORMAT(CAST(DOB AS DATE),'yyyyMMdd') FROM Employees;

```
SELECT TO\_CHAR(created\_at, 'YYYY-MM-DD') FROM table;
//converts any date format to YYYY-MM-DD