This can be handled with a one-liner:For clarity you can declare three additional variables if you like:vb Code:
MyValue = DateSerial(Right(Current_Date,4),Mid(Current_Date,3,2),Left(Current_Date,2))vb Code:
Dim lngYear As Long Dim lngMonth As Long Dim lngDay As Long lngYear = Right(Current_Date, 4) lngMonth = Mid(Current_Date, 3, 2) lngDay = Left(Current_Date, 2) MyValue = DateSerial(lngYear, lngMonth, lngDay)




Reply With Quote