title: Date validation VB6
body: <p>I have a masked textbox where users keep slipping in invalid dates - and when they get saved to SQL SERVER, there's an error. This is my validation on _lostFocus</p>
  
  <pre><code>If txtDate = "" Then
      Exit Function
  ElseIf Not IsDate(txtDate) Then
      Exit Function
  End If
  </code></pre>
  
  <p>I can put in a date such as 19/8/2000 and it passes. How can I validate it so that it's a valid date?</p>
  
  <p>Found the issue - so this function never converts it to mm/dd/yyyy format - it gets automatically converted to dd/mm/yyyy. How would I convert it?</p>
  
  <p>when i format it to txtDate = Format(txtDate , "mm/dd/yyyy") before I run it trhough the little if statement - the date simply gets converted to 8/19/2000 in that case</p>
  
  <p>Inside the textbox the date basically changes to 8/19/2000 - why is it doing that</p>