Please tell me what is wrong with the following piece of code:- $Datum = date("'Y-m-d H:i:s'"); $link = mssql_connect("localhost", "sa", "") or trigger_error('Could not connect to database', E_USER_ERROR); mssql_select_db("pm", $link) or trigger_error('Could not select database', E_USER_ERROR); $proc = mssql_init("spGetActivePromotions", $link); mssql_bind($proc, "@Today", $Datum, SQLTEXT, FALSE,FALSE,strlen($Datum)); $Result = mssql_execute($proc); if (!$Result) { $Message = sprintf("mssql_execute failed for %s [%d].", $Datum, $Result); trigger_error($Message, E_USER_ERROR); die(); } the stored procedure that I am attempting to use looks like :- CREATE PROCEDURE spGetActivePromotions @Today datetime AS SELECT PromotionID, PromotionName, StartDate, EndDate, LastDrawDate, MaxDraws, NumRegTickets, VouchersPermitted, NumTicketsPerVoucher, ManualTicketIssue FROM Promotion WHERE @Today>=StartDate AND @Today<=EndDate GO