A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @SAQ ,
Welcome to Microsoft Q&A!
Please refer below:
select year(cast(yourcolumn as date)) from yourtable
select format(cast(yourcolumn as date),'yyyy') from yourtable
select right(yourcolumn,4) from yourtable
Best regards,
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.