totn Access Functions

MS Access: Minute Function

This MSAccess tutorial explains how to use the Access Minute function with syntax and examples.

Description

The Microsoft Access Minute function returns the minute of the hour (a number from 0 to 59) given a time value.

Syntax

The syntax for the Minute function in MS Access is:

Minute ( time_value )

Parameters or Arguments

time_value
A valid time.

Returns

The Minute function returns a numeric value between 0 and 59.

Applies To

The Minute function can be used in the following versions of Microsoft Access:

  • Access 2019, Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

Example

Let's look at how to use the Minute function in MS Access:

Minute (#10:42:58 PM#)
Result: 42

Minute (#10:13:58 AM#)
Result: 13

Minute (#22/11/2003 10:00:58 PM#)
Result: 0

Example in VBA Code

The Minute function can be used in VBA code in Microsoft Access.

For example:

Dim LMinute As Integer

LMinute = Minute (#10:13:58 AM#)

In this example, the variable called LMinute would now contain the value of 13.

Example in SQL/Queries

You can also use the Minute function in a query in Microsoft Access.

For example:

Microsoft Access

In this query, we have used the Minute function as follows:

Expr1: Minute(#10:05:58 PM#)

and

Expr2: Minute([CategoryDate])

The first Minute function will extract the minute value from the time value 10:05:58 PM and display the results in a column called Expr1. You can replace Expr1 with a column name that is more meaningful.

For example:

MinuteValue: Minute(#10:05:58 PM#)

The results would now be displayed in a column called MinuteValue.

The second Minute function will extract the minute value from the CategoryDate field and return the results in a column called Expr2.