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

 

TIME(hour, minute, second)

 
 Returns the time as a decimal given the hour, minute and second.

 hourThe number between 0 and 23 representing the hour.
 minuteThe number between 0 and 59 representing the minute.
 secondThe number between 0 and 59 representing the second.

 REMARKS
 
  • If "hour" > 23, then "hour" Mod 24 is used.
     
  • If "minute" > 59, then "minute" is converted to hours and minutes.
     
  • If "second" > 59, then "second is converted to minutes and seconds.
     
  • If "hour" < 0, then #NUM! is returned.
     
  • If "minute" < 0, then the minutes are subtracted.
     
  • If "second" < 0, then the seconds are subtracted.

     EXAMPLES
     
     A
    1=TIME(12,0,0) = 12:00 PM
    2=TIME(16,48,10) = 4:48 PM
    3=TIME(7,30,30) = 7:30 AM
    4=TEXT(TIME(23,18,14),"h:mm:ss AM/PM") = 11:18 PM
    5=TIME(12,0,-10) = 11:59 AM
    6=TIME(12,-10,0) = 11:50 AM
    7=TIME(-12,0,0) = #NUM!
    8=TIME("some text",-10,0) = #VALUE!
     

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

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