I want to add where condition in my query like 2012-10-05 00:29:06.338 <= Today'sdatetime however I am getting the issue.

Please help me to sort out this issue.

My query is given below :

```
Select * from table1
where 
CONVERT(varchar(12),'2012-10-05 00:29:06.338', 106) + ' ' + CONVERT(varchar(12),'2012-10-05 00:29:06.338', 108) <= CONVERT(varchar(12), GETDATE(),106) + ' 23:59:00.000'

```