Getting current year in MySQL in 4 digits only.

vishalneeraj-24503
Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 220
Using Year function
select year(now()) as 'current year';

Using Date Format function
select date_format(now(),'%Y') as 'current year';

current year
2014

Comments or Responses

Login to post response