Santhosh K S

Santhosh K S

  • NA
  • 34
  • 46.4k

Reply as early as possible?

May 22 2012 9:25 AM
Hi.............

I have Stored procedure ALTER PROCEDURE [dbo].[ProcSummaryReport] 
-- Add the parameters for the stored procedure here
@DepartmentID int,
    @FromDateTime datetime,
    @ToDateTime datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

    -- Insert statements for procedure here
select ProjectName,ActivityName,Sum(TotalHour)as TotalHours From ProcesslogReport  where DepartmentID=@DepartmentID and Date BETWEEN @FromDateTime And @ToDateTime group by ProjectName,ActivityName

END

When i pass starttime & Endtime in mm/dd/yyyy it show Error String has not valid for datetime, i'm useing MS Sql server 2005, In  ProcesslogReport  Table Date column  in Datetime datatype
please Help 



Answers (1)