Option Explicit Private Sub Command1_Click() 'To convert from DD/MM/YY Dim intDay As Integer Dim intMonth As Integer Dim intYear As Integer Dim strDate As String strDate = "20/11/01" intDay = Left$(strDate, 2) intMonth = Mid$(strDate, 4, 2) intYear = Right$(strDate, 2) intYear = intYear + IIf(intYear < 50, 2000, 1900) If Format$(DateSerial(intYear, intMonth, intDay), "DD/MM/YY") = strDate Then MsgBox "Date " & strDate & " is valid" Else MsgBox "Date " & strDate & " is not valid" End If strDate = "30/02/01" intDay = Left$(strDate, 2) intMonth = Mid$(strDate, 4, 2) intYear = Right$(strDate, 2) intYear = intYear + IIf(intYear < 50, 2000, 1900) If Format$(DateSerial(intYear, intMonth, intDay), "DD/MM/YY") = strDate Then MsgBox "Date " & strDate & " is valid" Else MsgBox "Date " & strDate & " is not valid" End If strDate = "02/13/01" intDay = Left$(strDate, 2) intMonth = Mid$(strDate, 4, 2) intYear = Right$(strDate, 2) intYear = intYear + IIf(intYear < 50, 2000, 1900) If Format$(DateSerial(intYear, intMonth, intDay), "DD/MM/YY") = strDate Then MsgBox "Date " & strDate & " is valid" Else MsgBox "Date " & strDate & " is not valid" End If End Sub