回复 楼主 wxwkcl
Private Sub Command1_Click()
y = Year("11/9/2015 12:00:00 AM")
m = Month("11/9/2015 12:00:00 AM")
d = Day("11/9/2015 12:00:00 AM")
If d < 10 And m < 10 Then
s = y & "0" & m & "0" & d
ElseIf d < 10 Then
s = y & m & "0" & d
ElseIf m < 10 Then
s = y & "0" & m & "0" & d
ElseIf m < 10 Then
s = y & m & d
End If
MsgBox s
End Sub