Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

get day in sql

SELECT DATEPART(m, GETDATE()) as theMonth  -- returns 11
SELECT DATEPART(d, GETDATE()) as theDay   -- returns 20
SELECT DATEPART(yy, GETDATE()) as theYear   -- returns 2013
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #day #sql
ADD COMMENT
Topic
Name
2+4 =