title: Stored procedure, return startdate as start of month
body: <p>I am fairly new to SQL but I am looking at editing a stored procedure that we have so that we don't need to manually enter the @StartDate and @EndDate values. 
  The code is below. Basically I would like the StartDate to be the start of the previous month and the EndDate to be the current date. 
  This might be quite simple, however I can't find anything online that appears to relate to our issue. </p>
  
  <pre><code>USE [OnlineOrdering]
  GO
  
  DECLARE @return_value int
  
  EXEC    @return_value = [dbo].[usp_GetPayPalOrders]
          @StartDate = N'2017-01-01 00:00:00',
          @EndDate = N'2017-01-31 23:59:59'
  
  SELECT  'Return Value' = @return_value
  GO
  </code></pre>
  
  <p>Just to note, I didn't originally write this procedure, I would just like to be able to automate the dates to make it easier to run. </p>
  
  <p>Thank you</p>