Dates stored as varchar, ack!As Visakh suggested you can use teh CONVERT fuction using the 111 style:DECLARE @DateString VARCHAR(20) = '2013/06/30'SELECT CONVERT(DATETIME, @DateString, 111)
Unfortunatly, SQL won't be able to take advantage of an index. However, if you wanted rows for only the previous day then you could use something like:DECLARE @Foo TABLE (DateAsString VARCHAR(20))INSERT @Foo VALUES ('2013/06/01'), ('2013/06/02'), ('2013/06/03'), ('2013/06/01'), ('2013/06/02'), ('2013/06/04')DECLARE @CurrentDate DATETIME = '2013-06-03'SELECT *FROM @FooWHERE DateAsString = CONVERT(VARCHAR(10), DATEADD(DAY, -1, @CurrentDate), 111)