﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server Newbies  / Select records from current month / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 07:11:22 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Select records from current month</title><link>http://www.sqlservercentral.com/Forums/Topic1403620-1292-1.aspx</link><description>This works perfectly. Thank you very much :)</description><pubDate>Mon, 07 Jan 2013 08:15:16 GMT</pubDate><dc:creator>sqlrd22</dc:creator></item><item><title>RE: Select records from current month</title><link>http://www.sqlservercentral.com/Forums/Topic1403620-1292-1.aspx</link><description>Try this:[code="sql"]DECLARE @Date DATE = GETDATE();SELECT *FROM Client_Trades.DBO.TradesWHERE Trade_Date &amp;gt;= DATEADD(MONTH, DATEDIFF(MONTH, 0, @Date), 0)AND Trade_Date &amp;lt; DATEADD(MONTH, DATEDIFF(MONTH, 0, @Date)+1, 0);[/code]What that does is calculate the first day of the current month, and the first day of the next month.  Then it makes sure the Trade_Date &amp;gt;= first day of current, and &amp;lt; first day of next month.Does that do what you need?</description><pubDate>Mon, 07 Jan 2013 08:08:41 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>Select records from current month</title><link>http://www.sqlservercentral.com/Forums/Topic1403620-1292-1.aspx</link><description>Hi, I use a very basic select query[code]SELECT * FROM Client_Trades.DBO.TradesWHERE MONTH(Trade_Date) = '01'[/code]To extract records from a particular month. Is there any way of me not having to change the value e.g. '01' every month and just having it so it selects from the current month?Thanks for any help.EDIT: Trade_Date is a Date datatype.</description><pubDate>Mon, 07 Jan 2013 07:53:37 GMT</pubDate><dc:creator>sqlrd22</dc:creator></item></channel></rss>