SimpleDateFormat dateFormat = new SimpleDateFormat("mm/dd/yyyy");
Date date = dateFormat.parse("11/04/2011");
System.out.println(date);
System.out.println(dateFormat.format(date));
Tue Jan 04 00:11:00 IST 2011
11/04/2011
当输出date对象时,它显示为一月而不是十一月。但是当格式化相同的date对象时,它正确地显示了11月。
通过设置M
假设现在是11小时11分钟。它读作“一小时”和“十一分钟”,如:
Sub TEST1()
Application.Speech.Speak "It is " & Hour(Now()) & " hours and " & Minute(Now()) & " minutes"
End Sub
然而,下面的内容是“十一”小时和十一分钟
Sub TEST2()
Application.Speech.Speak "It is 11 hours and 11 minutes"
End Sub
相反