isDate(String) As Boolean


/ Published in: Visual Basic
Save to your folder(s)

This method checks whether a given string is a valid date (current regional settings are used)


Copy this code and paste it in your HTML
  1. Private Function isDate(dateString As String) As Boolean
  2. On Error GoTo NoDate
  3.  
  4. Dim test As Date
  5. test = DateValue(dateString)
  6. isDate = True
  7. Exit Function
  8.  
  9. NoDate:
  10. isDate = False
  11. End Function

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.