# Excel HOUR, MINUTE, SECOND Functions - Microsoft Excel HOUR, MINUTE, SECOND Function Tutorial

The HOUR, MINUTE and SECOND functions are designed to take an Excel serial date/time number and convert it to an hour, minute or second number representation. Of great use when building dashboards or worksheet tables that will be used in Pivot Tables.

## What are the Microsoft Excel HOUR, MINUTE and SECOND Functions?

The Excel HOUR, MINUTE and SECOND functions are computer programs that you run from a worksheet cell formula. They convert an Excel serial date number like 42005.5 in to an hour number range from 0-23, a minute number range from 0-59 and a second format like 0-59. You run these functions by typing their names in a formula then followed by the information they are suppose to use. These worksheet functions are used when you have to tear a date/time apart by its hour, minute and second number components. Their components are then used for tasks like logic, lookups, mathematical operations like + and -,  and table construction so the tables can be filtered with Excel's data tools like Pivot Tables, Sort and Autofilter.

## How Do You Type the HOUR, MINUTE and SECOND Worksheet Functions in a Formula?

Whenever you type a formula in a worksheet cell, this is called syntax or grammar. The general function syntax for these functions has a format like these when you type them in a worksheet cell:

= HOUR( serial_number )

= MINUTE( serial_number )

= SECOND( serial_number )

Where serial_number is called the function argument list. Remember, you are running a computer program at this point so the program needs information to operate and that is why there is an argument list. When you see an argument list and you see square brackets [ ] around the argument name, this means the argument is optional and you do not have to include it when typing unless you need it. So for the syntax above, you need to include 1 argument when typing the functions in a worksheet cell formula in order for it to calculate correctly. What argument values can be used are discussed below. Remember functions expect certain things in their argument lists, if you do not put the correct information in the list they will generate an error when run.

## HOUR, MINUTE and SECOND Worksheet Function Argument Definitions

• serial_number: Required. This is the date/time from which you want the hour, minute or second. This value can be a date entered in a cell or calculated by some function that returns a serial datetime number. For example, you can use TIME( 8, 24, 59 ) or TIMEVALUE( "8:24:59 AM" ) or something like 8:24:59 AM typed in a cell. It cannot, however, be text.
• Microsoft Excel stores dates/times on a worksheet as sequential serial decimal numbers so they can be used in worksheet formula calculations. So therefore January 1, 1900 12:00:00 PM is serial number 1.5 and June 30, 2015 6:00:00 PM is serial number 42185.75 because it is 42,185.75 days after January 1, 1900. Microsoft Excel for the Macintosh uses a different date system by default.

## How Do You Run the HOUR, MINUTE and SECOND Functions?

Since the HOUR, MINUTE and SECOND functions are computer programs, they run when you press Enter to enter the formula that contains them. If any of their arguments are wrong, the functions will return an error.

## What Do I Type for a HOUR, MINUTE and SECOND Function Argument?

When typing the HOUR, MINUTE and SECOND functions in a worksheet cell formula, you need to replace the serial_number argument with something that generates the serial number needed. Some typical arguments you can use are:

 Argument Type Cell Formula Example Explanation Cell Reference = HOUR( A1 ) Returns the hour number based upon what serial date/time number is in cell A1. For example if 8/24/2015 6:00:00 AM was in cell A1 then 6 would be returned Range Reference = MINUTE( A1:A10 ) Returns an array of minute numbers based upon the dates in cells A1 to A10 Nested Functions = SECOND( TIMEVALUE( "8:24:59 AM" ) ) Returns a second number based upon the decimal value returned from the TIMEVALUE function. Very common argument type for dashboard problems and from data stored in multiple columns

## Additional HOUR, MINUTE and SECOND Function Examples

The worksheet seen below contains some typical worksheet formulas that run the HOUR worksheet function. Pay close attention to the argument list and the syntax used to write the formula.

 A B C 1 Time 2 1/1/2015 8:05:59 AM 3 4 Formula below uses the HOUR function to obtain the hour from the date/time above, then VLOOKUP uses it to lookup an hour in another table. Typical use in a VLOOKUP formula 5 = VLOOKUP( HOUR( A2 ), \$G\$1:\$K\$100, 3, FALSE )

## Next Excel Training Dates - Public Training and Live Online Courses

Our next public Excel training workshops and live online Excel courses are listed below. For all of the dates and times, please visit our Training Schedule page using the link above in the main menu.

 Beginning Excel Training for Business Professionals Intermediate Excel Training for Business Professionals Advanced Excel Training for Business Professionals Beginning Excel VBA Training for Business Professionals Intermediate Excel VBA Training for Business Professionals Advanced Excel VBA Training for Business Professionals Advanced Excel Training for Engineers / Scientists Beginning Excel VBA Training for Engineers / Scientists Intermediate Excel VBA Training for Engineers / Scientists Advanced Excel VBA Training for Engineers / Scientists Microsoft Excel Dashboards Training for Combined Audience Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule Next Date:See Schedule

## Public Training Location

• Our Excel public training workshops are held in Thousand Oaks, CA which is in Ventura County which is in the vicinity of Los Angeles County (LA County), Orange County, San Diego County, Kern County, Riverside County and Santa Barbara County
• We get people from all over the US, Canada, Mexico and the Caribbean, even as far away as Saudi Arabia and Nigeria
• We routinely get individuals from all over Northern and Southern California, Oregon, Texas, Washington and Virginia including San Jose, CA ; Mountain View, CA ; San Diego, CA ; Palmdale, CA ; Lancaster , CA ; Mojave, CA ; Portland, OR ; Dallas, TX ; Houston, TX ; Austin, TX ; Fort Worth , TX ; Alexandria, VA and Seattle, WA
• We also broadcast our Excel public training as live hands-on online courses so even though you cannot travel to us, you can still take the course as if sitting in the room with us
• EMAGENIT routinely gets individuals from the following Southern California cities attending our public training:
• Santa Barbara, CA
• Los Angeles, CA
• Reseda, CA
• Chatsworth, CA
• Topanga, CA
• Santa Clarita, CA
• Newbury Park, CA
• Camarillo, CA
• Calabasas, CA
• Valencia, CA
• West Hollywood, CA
• Goleta, CA
• Palmdale, CA
• San Fernando, CA
• Burbank, CA
• Culver City, CA
• Anaheim, CA
• El Segundo, CA
• Fillmore, CA
• Gardena, CA
• Encino, CA
• Oxnard, CA
• Mojave, CA
• La Crescenta, CA
• Glendale, CA
• Flintridge, CA
• Beverly Hills
• Inglewood, CA
• Hawthorne, CA
• Manhattan Beach, CA
• Santa Paula, CA
• Century City, CA
• Sherman Oaks, CA
• Reseda, CA
• Woodland Hills, CA
• Hollywood, CA
• Studio City, CA
• Fillmore, CA
• Ventura, CA
• Moorpark, CA
• Simi Valley, CA
• Santa Monica, CA
• Encino, CA

EMAGENIT performs Excel onsite company training in the cities listed above as well as the entire Northern and Southern California areas, United States and Canada.

Need Help? Please call us at 1.866.924.6244