how to get today date in storeprocedure coding.
when using command text this will done using datetime.Today().
but how to get today date in storeprocedure?
i have select checktime using query ..
select top 1 @CheckType=CheckType,@CheckTime=CheckTime,@Userid=Userid,@Logid=Logid from Checkinout order by logid desc
now if checktime is today date then update record .for this i have do ....
if(@CheckTime = getdate())
begin
UPDATE Biometrics
SET [Name] = @Name,[Date]=InTime ,Group_Id = @Groupid, OutTime = @CheckTime, Duration=DATEDIFF(mi, InTime , @CheckTime) where id=@id
end
but my record not updated.what is problem?