TIMEVALUE |
TIMEVALUE(time_text) |
Returns the time as a decimal given a time in text format. |
time_text | The text string that represents the time. |
REMARKS |
* In Excel times are represented as decimals. * If "time_text" contains any date information, it is ignored. * If "time_text" is not a valid time, then #VALUE! is returned. * The decimal number is a value ranging from 0 (zero) to 0.99999999, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 P.M.). * Time values are a portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day). * The time format can be any of those on the "Format Cells" dialog box. * You can use the DATE function to return the date serial number given a YEAR, MONTH, DAY. * You can use the DATEVALUE function to return the date serial number for a date in text format. * You can use the DAY function to return the day as an integer given a date serial number. * You can use the MINUTE function to return the minute as an integer given a date serial number. * You can use the NUMBERVALUE function to return the number that a text string represents. * You can use the SECOND function to return the number of seconds as an integer given a date serial number. * You can use the TEXT function to convert a date serial number into a formatted text string. * For the Microsoft documentation refer to support.microsoft.com * For the Google documentation refer to support.google.com |
|
1 - What is the time "12 AM" formatted with the format "h:mm AM/PM". 2 - What is the time "12:00 PM" as a decimal. 3 - What is the time "6 AM" formatted with the format "h:mm AM/PM". 4 - What is the time "16:00" formatted with the format "h:mm AM/PM". 5 - What is the time "2:24 AM" as a decimal. 6 - What is the time from the date and time "22-Aug-1955 6:00 AM" as a decimal. 7 - What is the time from the date and time "01/07/1977 12:00:00" as a decimal. 8 - What is the time from a text string in the custom time format "hh:mm:ss" as a decimal. 9 - If the date and time format is not valid, then #VALUE! is returned. Any decimals less than 1 will have a zero day component. 10 - If the date and time format is a decimal formatted as a text string, then #VALUE! is returned. |
© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top