Calculation Retirement age at 60 Years from date of birth

Raj.Trivedi
Posted by Raj.Trivedi under Sql Server category on | Points: 40 | Views : 3678
Hello

Here is the stored procedure for calculating retirement age after 60 years from DOB

alter proc CalcRetirementAge
(
@date datetime
)
as
begin
declare @retireyear datetime;
declare @RetirementDate varchar(18);
set @retireyear = DATEADD(YYYY,60,@date)
set @RetirementDate =(select CONVERT(varchar(18),@retireyear,103))
select @RetirementDate 'RetirementDate'
end

Comments or Responses

Login to post response