title: validate a date in t-sql?
body: <p>I just want to validate a given input from the user</p>
  
  <pre><code>Declare @UserInput NVARCHAR(20)
  set @UserInput = '26/07/2013'
  select ISDATE(@UserInput)
  </code></pre>
  
  <p>This will return false as the date is in australian format, even though the date is valid</p>
  
  <p>I can change the last line to the folowing</p>
  
  <pre><code>select isdate(CONVERT(datetime, @UserInput, 103))
  </code></pre>
  
  <p>and it works.  But if the @Userinput was rubbish (ie:- 'hello'), then the last statement would fail.  How can I have something, where no matter what the user enters, it validates it to an australian date (dd/mm/yyyy)?</p>
  
  <p>Thanks</p>