How to pass date time in stored procedure through variable.
Dear membersGreetings for the day.
I have written a stored procedure which required Input Parameter Date and a query which fetches the data as per that date.
Query is as follows:
select * from Master where Dt_Birth<@Dt_Birth (not working)
select * from Master where Dt_Birth<'1964-10-01 00:00:00' (working)
column Dt_Birth is smalldatetime, not null
In stored procedure I have declared @Dt_Birth as datetime
ALTER Proc [sp_Offer_dynamic]
(
@Program varchar(500),
@Dt_Birth datetime
)
as
Begin
Kindly help what mistake I am doing.