TimeValue

Convert a string to a Time.

Syntax
      TimeValue ( String )

Key
   String   A string representation of a time
            (0:00:00 to 23:59:59).

The hour/minute/seconds may be numeric expressions.

The TimeValue() function may be used in VBA or in an SQL query.

Example

Dim dtmSaved
dtmSaved = TimeValue ("13:30:45")
or
dtmSaved = TimeValue ("1:30:45 PM")

“The hours of folly are measured by the clock, but of wisdom no clock can measure” ~ William Blake

Related:

Now - Return the current date and time.
Date - Return the current date.
TimeSerial - Return a time given an hour, minute, and second.


© Copyright SS64.com 1999-2013
Some rights reserved