How to convert to date format?
3 answers
As VBA code - you can wrap it as a function
Dim strMyDate As String
Dim dteDate As Date
strDate = "20090528"
dteDate = DateSerial(Left(strDate, 4), Mid(strDate, 5, 2), Right(strDate, 2))
MyStr = Format(dteDate, "dd-mmm-yyyy")
Debug.Print MyStr
As a data type in a table . If you add data to a table where the field is Date / Time formatted you can specify the format in the form / table i.e. at the exit.
+3
source to share