TIMEVALUE Function (VisioShapeSheet)
Returns the time value represented by datetime or expression, based on the system's Region and Language settings.
Syntax
TIMEVALUE("datetime"|expression[,lcid])
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
datetime |
Required |
String |
Any string commonly recognized as a date and time or a reference to a cell containing a date and time. |
expression |
Required |
Varies |
Any expression that yields a date and time. |
lcid |
Optional |
Number |
The locale identifier to be used in evaluating a nonlocal datetime. The locale identifier is a number described in the system header files. |
Remarks
Any date component in datetime or expression is discarded.
If datetime is missing or cannot be converted to a valid result, this function returns a #VALUE! error.
The TIMEVALUE function also accepts a single number value for expression where the decimal portion of the result represents the fraction of a day since midnight.
Example 1
TIMEVALUE("6:00 AM")
Returns the value representing 6:00 AM.
Example 2
TIMEVALUE("14:30")+4 eh.+30 em.
Returns the value representing 19:00:00.
Example 3
TIMEVALUE("11 AM, July 1, 1997")
Returns the value representing 11:00 AM.
Example 4
TIMEVALUE(0.6337)
Returns the value representing 15:12:32.
Example 5
TIMEVALUE("7:89")
Returns a #VALUE! error.