Friday, 16 February 2018

Date parameter as dd/mm/yyyy

USE [Girfa_StudentHelp]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc [dbo].[StuReport]
(
@d1 varchar(100),
@d2 varchar(100)
)
AS
BEGIN

     SET NOCOUNT ON;
           SELECT  * FROM  dbo.Student
           where convert(date,dbo.Productstock.createdate,103) between    convert(date,@d1,103)  and convert(date,@d2,103)          
     SET NOCOUNT OFF;
END


No comments:

Post a Comment