My table contains the column 'StartDate' and value stored in the column is in format '23.1.2018'.

I am writing a select query where I am passing FromDate and ToDate.

```
@FromDate = '2018-08-01'
@ToDate = '2018-08-05'

```

After execution, I get an error 

> 
> Conversion failed when converting date and/or time from character string
> 
> 
> 

Apart from that I have used several techniques of CAST and CONVERT like `CONVERT(date, StartDate, 104)` and so on...

But the same error persists.

Looking forward to solution.

```
select * 
from [dbo].[LMT2_ServerLicenseUser] 
where cast(cast(startdate as datetime(7)) as date) = cast(cast(@FromDate as datetime(7)) as date)

SELECT CONVERT(date, '2018-08-01')

select convert(varchar, '24.11.2017', 23)   

select CONVERT(VARCHAR, CONCAT(CONVERT(date, StartDate, 104), RIGHT('0' + CONVERT(VARCHAR, StartTime), 8)), 103)

```