Posted By

CaptainProton on 03/01/10


date String

Versions (?)

isDate(String) As Boolean

 / Published in: Visual Basic

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

  1. Private Function isDate(dateString As String) As Boolean
  2. On Error GoTo NoDate
  4. Dim test As Date
  5. test = DateValue(dateString)
  6. isDate = True
  7. Exit Function
  9. NoDate:
  10. isDate = False
  11. End Function

Report this snippet  

You need to login to post a comment.