I have a records of events with starttime and endtime for a calendar control.
I want to get the events done on a particular date say 2/28/2009
But the db table has date data in form 2/28/2009 10:00:00, 2/28/2009 12:00:00.
I tried this query in a sproc created in VS 2005 IDE but it didn't work
ALTER PROCEDURE dbo.spSelectBenchEvent
(
@EVENT_DATE DATE // BTW, THIS RETURNS ERROR :CANNOT FIND DATE DATATYPE.
//@EVENT_DATE HAS INVALID DATATYPE
)
AS
BEGIN TRAN
SET NOCOUNT ON;
SELECT ID, EID, BENCHID, PACCODE, START_TIME, END_TIME
FROM tbl_benchbook
WHERE START_TIME=EVENT_DATE
ORDER BY START_TIME
Thanks in advance.