Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql first day of current year

SELECT DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0);			-- SQL Server
SELECT TRUNC(sysdate, 'YEAR') FROM DUAL;					-- Oracle
SELECT MAKEDATE(year(now()), 1);							-- MySQL
 
PREVIOUS NEXT
Tagged: #sql #day #current #year
ADD COMMENT
Topic
Name
3+2 =