title: How to assign a return value from a SQL Server Function to a Variable
body: <p>I have function that returns a Date value. I need to assign that return value to a declared variable. </p>
  
  <pre><code>Declare @Duedate Date
  Set @Duedate = SELECT dbo.TATDueDateCaluator('2019-05-10',2)
  Select @Duedate
  </code></pre>
  
  <p>Msg 156, Level 15, State 1, Line 2
  Incorrect syntax near the keyword 'SELECT'.</p>