I would like it to only return text that would fit into a specific format.
(ie. short date, long Date, etc.)
Ummm...
Why?
A Date/Time value is stored as a number. It's not stored with any
particular format. You can specify any format you wish for it, on a
form or report. What's the context? What are you trying to accomplish?
Just FWIW a function that would do what you describe - take a text
string and return a Short Date translation of it - might be
Public Function CleanDate(strIn As String) As String
If IsDate(strIn) Then
CleanDate = Format(CDate(strIn), "Short Date")
Else
CleanDate = "Not A Date: " & strIn
End If
End Function
This would take an input of "2-Dec-2041" and return "12/2/2041", an
input of "Fred" and return "Not a Date: Fred", and an input of
"2/30/2005" and return "Not a Date: 2/30/2005".
John W. Vinson[MVP]