title: Getdate() equivalent for Jet / Access database. Need last month records
body: <p>I was reading other questions posted and found many examples to retrieve last month records. I am using Visual Studio 2008 query builder to retrieve records from an Access mdb and when I enter the following query it is displaying me an error that getdate is not a valid function:</p>
  
  <pre><code>where [Transaction Date]     
     between dateadd(mm, datediff(mm, 0, dateadd(MM, -1, getdate())), 0)
         and dateadd(ms, -3, dateadd(mm, datediff(mm, 0, dateadd(MM, -1, getdate())) + 1, 0))
  </code></pre>
  
  <p>What is the correct sql query to extract last month records from an mdb?</p>
  
  <p>This is a query I have, but it is giving me records from this month also amd just need last month:</p>
  
  <pre><code>  SELECT
     [Product Code], [Description One], [Transaction Number], Quantity, [Sales Value], Cost, [Transaction Date], [Transaction Time], Department, [Type Code], Cashier, [Computer Name], [Customer Code]
    FROM
     [Product History] 
    WHERE
     ([Transaction Date] &gt;= DATEADD('m', - 2, NOW()))
  </code></pre>
  
  <p>Any help is appreciated.</p>