TimeValue

This function creates a Variant of subtype Date containing the time.

Syntax

TimeValue(time)

Parameters

time
Usually a string expression that represents a time from 0:00:00 (12:00:00 A.M.) through 23:59:59 (11:59:59 P.M.). However, time also can be any expression that represents a time in that range.

Return Values

Returns a Variant of subtype Date.

Remarks

You can enter valid times using a 12-hour or 24-hour clock. For example, 2:24 P.M. and 14:24 are both valid time parameters.

If the time parameter contains date information, TimeValue does not return the date information. However, if time includes invalid date information, an error occurs.