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: 
You can do as follows:

```
Select Format(test.Time, 'yyyyMMdd')
From TableTest test

```
SELECT YEAR(getdate()) \* 10000 + MONTH(getdate()) \* 100 + DAY(getdate())