THE WORLD'S LARGEST WEB DEVELOPER SITE

MS Access Hour() Function

❮ MS Access Functions

Example

Return the hour for a specified time:

SELECT Hour(#14:48:23#);
Try it Yourself »

Definition and Usage

The Hour() function returns the hour (from 0 to 23) for a time value.

Syntax

Hour(time)

Parameter Values

Parameter Description
time Required. A valid time

Technical Details

Works in: Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

More Examples

Example

Return the hour for the current time:

SELECT Hour(Now());
Try it Yourself »

Example

Return the hour for a specified date and time:

SELECT Hour(#24/10/2016 11:18:34 PM#);
Try it Yourself »

❮ MS Access Functions