Microsoft Office Tutorials and References
In Depth Information
Deconstructing Time with HOUR, MINUTE, and SECOND
4. Type ) and press Enter.
TIMEVALUE works just with text. If the TIMEVALUE function returns the error
code #VALUE#, it probably means one of two things:
✓ The time is in a text format that Excel does not recognize, such as
“2:28PM” (no space before PM) instead of “2:28 PM”.
✓ The time is not actually in text format but is an Excel time serial number
formatted to look that way. Change the cell format to General to check.
Deconstructing Time with HOUR,
MINUTE, and SECOND
Any moment in time really is a combination of an hour, a minute, and a
second. In the preceding section, I show you how the TIME function puts
these three components together. In this section, I show you how to break
them apart using the HOUR, MINUTE, and SECOND functions. The worksheet
in Figure 13-2 shows a date and time in several rows going down Column A.
The same dates and times are shown in Column B, with a different format.
Columns C, D, and E show the hour, minute, and second, respectively, from
the values in Column A.
Note that if the date/time serial number contains a date part, then HOUR,
MINUTE, and SECOND ignore it; all they care about is the time part.