title: sql scalar function returns invalid quarter
body: <p>I am sure that I am overlooking some simple thing, I admit that I am still learning various aspects of SQL and the Datepart function is one..</p>
  
  <p>I am inputting a date and returning an invalid quarter, here is the code:</p>
  
  <pre><code>SET ANSI_NULLS ON
  GO
  
  SET QUOTED_IDENTIFIER ON
  GO
  
  ALTER FUNCTION Dbo.FN_Get_Quarter (
    -- the parameters for the function here
    @date                  varchar(10)
  ) RETURNS BIT
  AS
  BEGIN
  
    RETURN datepart(qq,@date)
  
  END
  </code></pre>
  
  <p>Here is the test I am using and the returned value... </p>
  
  <pre><code>select dbo.FN_GET_QUARTER('07-14-2010') 
  </code></pre>
  
  <p>...returns 1</p>