-
Hi I used the following code to change the system date to a string like "000923" for 23rd,sept 2000, however when I try this code on another computer gives me "002309". What's the cause of it? How can I modify my code to adapt different types of system date? Thanks!
Code:
strDate = Right(Date, 2) & IIf( _
Len(Mid(Date, InStr(1, Date, "/") + 1, InStrRev(Date, "/") - InStr(1, Date, "/") - 1)) = 1, "0" & _
Mid(Date, InStr(1, Date, "/") + 1, InStrRev(Date, "/") - InStr(1, Date, "/") - 1), Mid( _
Date, InStr(1, Date, "/") + 1, InStrRev(Date, "/") - InStr(1, Date, "/") - 1)) & Left( _
Date, 2)
-
<?>
Private Sub Command1_Click()
Dim x
x = Format(Date, "yymmdd")
MsgBox x
End Sub
-
hmcheung
Tell the lady behind you to turn around and wave. She's on the TUBE !!!
-
Thanks HeSaidJoe, it solves my problem.
James Stanich, the lady behind me is complaining that she is being captured by my webcam. :P