Display Years
Hi, how can i display current year to next 15 years by using sql.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sarath KumarPosted Aug 12, 2014, 5:15 AM
now you can understand
Ankur JainPosted Aug 12, 2014, 4:07 AM
Sorry,I didn't get your question properly but here is the query to get next year or how many of year next to current year you want to get, you just add number in query then you will get the next year ..
select CONVERT(datetime, CONVERT(VARCHAR(20), YEAR(GETDATE())+15) + '.01.01')
Sarath KumarPosted Aug 12, 2014, 3:32 AM
for example, i need to display 2014 to 2030
Dipankar BiswasPosted Aug 12, 2014, 3:23 AM