title: sql server job generated error
body: <p>I have the following error when I execute a job:</p>
  
  <pre><code>The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
  </code></pre>
  
  <p>This is my query stored procedure executed in the stored procedure of the job:</p>
  
  <pre><code>Update   table1
      Set     Field1 = DurationComputeFunction(Customer_ID,Start_Date)
              , Event_DateStamp = GetDate()
      From    table1 
      WHERE   DateDiff(day,Start_Date,getdate()) &lt; 90
  </code></pre>
  
  <p>this stored procedure compute a duration. It only needs the customer ID and a Start Date.</p>
  
  <p>On the other hand, I note that the following query:</p>
  
  <pre><code>select cast('23/10/2014' as datetime)
  </code></pre>
  
  <p>returns also the same error using windows authentication but returns no error (2014-10-23 00:00:00.000) when it is executed in sql server authentication.</p>
  
  <p>So I deduce that maybe the job is executed with windows authentication that's why the stored procedure (the query) generates an error.</p>
  
  <p>Am I right??</p>
  
  <p>IF yes is there any way to force the job to be executed with sql server authentication??</p>
  
  <p>Thanks</p>