求救!关于显示日期的问题,急!!!
Command1(1).Caption = Right(Year(Date - 5), 2) & Right("0" & Month(Date - 5), 2) & Right("0" & Day(Date - 5), 2) 这段代码是显示当前的年月日(比如今天是2012年11月4日则它会显示121104),那个-5是什么意思,不明,希望会的哥们帮我讲解下,谢谢!
Private Sub Form_Load()
Debug.Print Trim(Right(Year(Date - 5), 2))
Debug.Print Trim(Year(Date - 5))
Debug.Print Trim(Date)
Debug.Print Trim(Date - 5)
Debug.Print Trim(Right(Year(Date), 2) & Right("0" & Month(Date), 2) & Right("0" & Day(Date), 2))
Debug.Print Trim(Right(Year(Date - 5), 2) & Right("0" & Month(Date - 5), 2) & Right("0" & Day(Date - 5), 2))
End Sub
12
2012
2012/11/4
2012/10/30
121104
121030