Date and Time

Date Function

Returns the current system date

DateAdd Function

Returns the result of a data/time addition or subtraction calculation

DateDiff Function

Returns the difference between two dates

DatePart Function

Returns the part of the date requested

DateSerial Function

Returns a date from an expression containing month, day and year

DateValue Function

Returns a date from a representation of a date

Day Function

Returns a number representing the day of the week

Hour Function

Returns a number representing the hour of the day

Minute Function

Returns a number representing the minute of the hour

Month Function

Returns a number representing the month of the year

MonthName Function

Returns the name of the month for a given date

Now Function

Returns the current system time

Second Function

Returns a number representing the second of the minute

Time Property

Returns or sets the current system time as a variant

Timer Property

Returns the number of seconds elapsed since midnight

TimeSerial Function

Returns a representation of a given hour, minute and second

TimeValue Function

Returns a time value from a string representation of a time

Weekday Function

Returns a number representing the day of the week

WeekdayName Function

Returns a string indicating the day of the week

Year Function

Returns a number representing the year in a date expression

Get VBScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.