Answers for "how to get only year from getdate in sql server"

SQL
0

sql getdate date only

-- MS SQL Server
SELECT CAST(getdate() AS date);
SELECT CAST(getdate() AS varchar(10));
Posted by: Guest on March-26-2021
0

sql get year from datetime field

SELECT YEAR(DateTimeField)
FROM MyTable
Posted by: Guest on May-13-2021

Code answers related to "how to get only year from getdate in sql server"

Code answers related to "SQL"

Browse Popular Code Answers by Language