O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Minute Function

Class

Microsoft.VisualBasic.DateAndTime

Syntax

Minute(TimeValue)
TimeValue (required; date)

Date variable or literal date

Return Value

An Integer between 0 and 59, representing the minute of the hour

Description

Extracts the minute component from a given date/time expression

Rules at a Glance

  • If TimeValue is not 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.

  • If TimeValue contains Nothing, 0 is returned, so be careful here to check for Nothing.

  • You can also use the DatePart function.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required