I have a table which must be able to be sorted by a range of dates. I currently have this query written for the tables dataset:
B.USERNAME,A.DOCK,A.MILL_ORIGIN,A.AMOUNT_SHIPMENT,A.FREIGHT_COMPANY,A.DRIVER,A.PLATE_NUMBER, C.ORIGIN, A.HARVEST
FROM RECEIVING A LEFT JOIN COMPANY_USERS B ON A.USER_NUM = B.USER_NUM LEFT JOIN ORIGIN C ON A.ORIGIN_NUM = C.ORIGIN_NUM
WHERE A.RECEIVE_TIME BETWEEN
'DEC 5, 2010 4:30 PM'
AND 'DEC 7, 2010 4:30 PM'
The ‘WHERE’ dates currently in the code produce a query with desired rows returned. The problem lies in the fact that I cannot use a property to dynamically sort the data. When I attempt to use a property to sort, I receive an error which states that SQL is having problems converting type varchar to type datetime.