Name

Minute Function

Syntax

Minute(time)
time

Use: Required

Data Subtype: Date/Time

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

Return Value

A Variant of subtype Integer.

Description

Returns an integer between 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 & 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 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.