hi i have been asked to write a function that check the length of a date string and to enscure it check the date entered to make sure the first 2 are digits the next 3 or letter last 2 are digits
so someone enters the date 01jan12
need this function to check that its right
have a small bit of it done not sure how to do the checking of the first 2 been number next 3 been letter etc
here is what i have so far
anyone have any idea of the best way to do this
so someone enters the date 01jan12
need this function to check that its right
have a small bit of it done not sure how to do the checking of the first 2 been number next 3 been letter etc
here is what i have so far
Code:
Private Function checkDateFormat(sTxt As String) As String
If Len(sTxt) = 7 Then
Else
checkDateFormat = sTxt
End If
End Function