ExcelFunctions.net Logo

The Excel TIMEVALUE Function

Home » Excel-Built-In-Functions » Excel-Date-And-Time-Functions » Excel-Timevalue-Function
Search this site:
Custom Search
Related Function: 
Excel Dates & Times
Note that Excel stores dates & times as numerical values. It is purely the formatting of these numbers that tells Excel to display a date or a time.

For more information on dates & times in Excel, see the Excel Dates & Times page.

Basic Description

The Excel Timevalue function converts a text representation of a time, into an Excel time.

- ie. the function converts a text string representing a time, into the decimal value that represents the time in Excel.

The syntax of the Timevalue function is :

TIMEVALUE( time_text )

where the time_text argument is a text string representing a time. Within this text string, the hours, minutes and seconds should be separated by colons.


Interpretation of Time Text Strings

If just two values are supplied (eg. 02:54), this will be treated as hours and minutes, not minutes and seconds. If you want to represent 2 minutes and 54 seconds, this must be supplied with the hour specified as zero (eg. "00:02:54").

Note also that, if the time_text argument contains a date and time, the Timevalue function ignores the date part of the text string.

These rules are illustrated in the examples below.


Timevalue Function Examples

The following spreadsheet shows several examples of the Excel Timevalue function. The format of the function is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right.

 Formulas:
Examples of use of the Excel Timevalue Function
 Results:
Excel Timevalue Function Results

In the above example spreadsheet:

  • The value in cell A6 is a date and time, and so in this case, the Timevalue function has ignored the date part of the value, and just used the time portion.
  • The cells in the results spreadsheet all have the general formatting. These values can be displayed as times by changing the cell formatting. To do this:
  • Highlight the cell(s) to be formatted
  • Right click with the mouse
  • Select the Format Cells ... option and ensure the Number tab is selected
  • Under the Category heading, select the option Time. Select a time format from the list on the right and click OK

For more details on formatting in Excel, go to the Excel Formatting page.


Further information and examples of the Excel Timevalue function can be found on the Microsoft Office website.


Timevalue Function Error

If you get an error from the Excel Timevalue function, this is likely to be the #VALUE! error :

Common Error
#VALUE! - Occurs if the supplied time_text cannot be recognised as a valid Excel time.




Valid XHTML 1.0 Transitional
Disclaimer Privacy Policy

Copyright © 2008-2011 ExcelFunctions.net