title: Operand data type date is invalid for subtract operator
body: <p>I have a field in my table called <code>[LastDate] with DataType Date</code>. and I am going to write a function which compute  the <code>[LastDate]-@PassedParameter</code>, but the error happen :</p>
  
  <pre><code>Operand data type date is invalid for subtract operator.
  </code></pre>
  
  <p>I don't know why?</p>
  
  <p>hara is the function:</p>
  
  <pre><code>CREATE FUNCTION Salman( @Date  date )
  RETURNS TABLE 
  AS
  RETURN 
  (
  
  SELECT TOP 1000 [ID]
        ,[Name]
        ,[LastDate]
        ,[Rule]
        ,[CoA]
    FROM [Scheduling_Employee].[dbo].[Group]
    where ([LastDate]-@Date)%[Rule]=0  
  )
  GO
  </code></pre>