Если оставить в стороне тот факт, что у вас есть опечатка - вы хотели, чтобы CDate(dt)
- CDate
не не поддерживали сокращенные названия месяцев.Так что вам нужно написать код от руки.Вот такой фрагмент:
Public Function fConvertDate(strDate As String) As Date
Dim bytDay As Byte
Dim intYear As Integer
Dim strMonth As String
Dim bytMonth As Byte
bytDay = Val(Left$(strDate, 2))
intYear = CInt(Mid$(strDate, 6, 4))
strMonth = UCase$(Mid$(strDate, 3, 3))
bytMonth = Val(Switch(strMonth = "JAN", "1", strMonth = "FEB", "2", strMonth = "MAR", "3", _
strMonth = "APR", "4", strMonth = "MAY", "5", strMonth = "JUN", "6", strMonth = "JUL", "7", _
strMonth = "AUG", "8", strMonth = "SEP", "9", strMonth = "OCT", "10", strMonth = "NOV", "11", _
strMonth = "DEC", "12"))
fConvertDate = DateSerial(intYear, bytMonth, bytDay)
End Function
Код взят из https://bytes.com/topic/access/answers/969310-how-convert-text-ddmmmyyyy-format-date.