Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql server previous month

SELECT * 
FROM Member
WHERE DATEPART(m, date_created) = DATEPART(m, DATEADD(m, -1, getdate()))
AND DATEPART(yyyy, date_created) = DATEPART(yyyy, DATEADD(m, -1, getdate()))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #server #previous #month
ADD COMMENT
Topic
Name
7+6 =