Monday, March 19, 2012

Convert to month year

I have numbers like 16, 30. Now I have to convert them to year and
months like 16 would be 1 year 4 months. Thanks.declare @.num int
set @.num = 16
select @.num/12 as years, @.num % 12 as months
"Dipak" <dipakpaudel@.gmail.com> wrote in message
news:1128696439.770616.185290@.f14g2000cwb.googlegroups.com...
>I have numbers like 16, 30. Now I have to convert them to year and
> months like 16 would be 1 year 4 months. Thanks.
>

No comments:

Post a Comment