Method: Now for VBS
- 已更新2024-09-12
- 閱讀時間為 1 分鐘
Methods > Method: Now for VBS
Method: Now for VBS
Specifies the current date and the current time.
vNow = Object.Now
| Object | VBS Object with this method. You do not need to specify this object. |
| vNow | Variant Receives the current date and the current time. |
The following example displays the current date and the current time:
Dim MyVar MyVar = Now Call MsgBox(MyVar) ' Returns current date and time
See Also
Related Topics
DateAdd | DateDiff | DatePart | DateSerial | DateValue | Date | Day | Hour | Minute | MonthName | Month | Now | Second | TimeSerial | TimeValue | Time | Timer | Weekday | WeekdayName | Year