Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

tsql get beginning of year

SELECT
   DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0) AS StartOfYear,
   DATEADD(yy, DATEDIFF(yy, 0, GETDATE()) + 1, -1) AS EndOfYear
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tsql #beginning #year
ADD COMMENT
Topic
Name
3+8 =