依 DateSerial 或 DateValue 產生的順序日期數,傳回表示某月中某一天的數值。
Day (Number)
Integer
Number:數值表示式,包含用於確定某月中某一天的順序日期數。
此函數基本上是 DateSerial 函數的逆運算,它依 DateSerial 或 DateValue 函數產生的順序日期數傳回某月中的某一天。例如,表示式
Print Day(DateSerial(1994, 12, 20))
傳回值為 20。
5 無效的程序呼叫
sub ExampleDay
Print "Day " & Day(DateSerial(1994, 12, 20)) & " of the month"
end sub