i have a table which contains date field .the datatype of the field is varchar.I need to compare these dates in one query also in another query i need to calculate previous date from current date also.how i should write this query?it gives me conversion error.
my query is as follows without converting any date fields to datetime format of sql server.
select SuppliedDate,VrNo,OrderNo, (First_name + ' ' + Last_name) as Name,DoB,Gender,ShippingType,Address,City,State,Country,ZipCode,DrName,PName,vr_date,Status,Remark
from TransactionMaster where
((SuppliedDate=null and (vr_date >= CONVERT(CHAR(12), DATEADD(dd, -1, '11/30/2013'), 112) AND vr_date <= '11/30/2013')) and AdminEdit='0')
It doesnt return me any rows.
if i convert fields to datetime format it gives me conversion error.