I have a sql 2005 database that has a smalldatetime field. I am creating an asp.net application with vb.net code behind that will return a dataset from that table and fill a grid. On my form there is a data picker. When you select a date from the date picker it should return all records from the table that have the selected date. The date picker returns a date in this format..
mm/dd/yyyy here is the query I am working on but cant figure out how to get it to work... This is one of many different way I have tried...any help would be great - Todays_Date is the field with smalldatetime data type - in the example below I am just plugging in any date that is formatted how the date picker would
SELECT KEYField, GUID, FKEYEmployee, RadioEntity, FKEYRadio_Number, Todays_Date, TimeOut, TimeIn, Location, Note, EnteredBY, EnteryTime, Status,
FKEYTract, Check_Out_By, Check_Out_Time, Check_In_By, Check_In_Time
WHERE (TO_CHAR(Todays_Date, 'MM/DD/YYYY') = '2 / 4 / 2015')