Private Sub cmda_Click()
If IsDate(txta.Text) Then
txtd.Text = Format(CDate(txta.Text), "dd/mm/yyyy")
Else
MsgBox txtd.Text & " is not a date format!"
End If
End Sub
If txta.Text is 23/11/79
txtd.text = 23/11/1979
If txta.Text is 05/11/79
txtd.text = 11/05/1979
If txta.Text is 01/02/03
txtd.text = 03/02/2001
How to correction ?
If IsDate(txta.Text) Then
txtd.Text = Format(CDate(txta.Text), "dd/mm/yyyy")
Else
MsgBox txtd.Text & " is not a date format!"
End If
End Sub
If txta.Text is 23/11/79
txtd.text = 23/11/1979
If txta.Text is 05/11/79
txtd.text = 11/05/1979
If txta.Text is 01/02/03
txtd.text = 03/02/2001
How to correction ?
全站熱搜
留言列表