Name

Minute Function

Syntax

Minute(time)
time

Use: Required

Data Type: Date

Any valid date/time expression, or an expression that can be evaluated as a date/time expression.

Return Value

An Integer.

Description

Returns an integer between 0 and 59 representing the minute of the hour from a given date/time expression.

Rules at a Glance

If time is Null, the Minute function returns Null.

Programming Tips and Gotchas

If time isn’t a valid date/time expression, the function generates runtime error 13, “Type mismatch.” To prevent this, use the IsDate function to check the argument before calling the Minute function.

Get VBScript in a Nutshell, 2nd Edition 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.