Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql first day of 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: #mysql #day #year
ADD COMMENT
Topic
Name
7+9 =