title: Text parameter input with date validation
body: <p>I want to allow user to input a date as a parameter in my report.</p>
  
  <p>I'm using <code>datetime</code> type for a parameter (so it shows a datepicker). After I change region of my PC to "United Kingdom", it show correct format "dd/mm/yyyy", but when I view it on web portal the format is wrong: it show me "mm/dd/yyyy". Note that my browser language already set to "en-GB".</p>
  
  <p>So, I'm thinking that if I create in text box, I need validation for it. I have done some research, and implemented the following VB code in report properties's code tab:</p>
  
  <pre class="lang-vb prettyprint-override"><code>function CheckDateParameters(Dateas date) as Integer
      Dim msg as String
  
      If IsDate(Date)    Then 
          msg="correct format"
      else
          msg="invalid date format"
      End If
  
       If msg &lt;&gt; "" Then
          MsgBox(msg, 16, "Report Validation")
          Err.Raise(6,Report)                    'Raise an overflow
       End If
  End Function
  </code></pre>
  
  <p>To call the function I do:</p>
  
  <pre><code>=Code.CheckDateParameters(Parameters!from.Value)
  </code></pre>
  
  <p>This function works if the date format is correct, but it does not work if the format is wrong. (I am not familiar with VB language.)</p>
  
  <p>What is the proper way to do the validation? Is it on the SSRS side, or should I do it in my stored procedure?</p>