Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions > Date and Time > HOUR

 

HOUR(serial_number)

 
 Returns the hour as an integer given a date serial number.

 serial_numberThe time that contains the hour you want to find.

 REMARKS
 
  • The "serial_number" can be a time, value, cell reference or a text string in a time format.
     
  • If "serial_number" < 0, then #NUM! is returned.
     
  • If "serial_number" is not a valid time or date, then #VALUE! is returned.
     
  • You can obtain the serial number from a time by using the TIME() function.
     
  • You can use the TIMEVALUE() function to return the serial number representing a time in a text format.

     EXAMPLES
     
     AB
    1=HOUR(B1) = 1111:30:15
    2=HOUR("11:30:15") = 11=NOW() = 20:17:34
    3=HOUR(B2) = 20=NOW() = 39294.846
    4=HOUR(0.678) = 16 
    5=HOUR(TIME(15,10,55)) = 15 
    6=HOUR(TIMEVALUE("6:45:22 PM")) = 18 
    7=HOUR(0) = 0 
    8=HOUR(-10) = #NUM! 
    9=HOUR("some text") = #VALUE! 
     

     Functions - H | Index - H | Dates & Times | Office Online 

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.Top