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 can be numeric expressions.

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

Examples

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 © 1999-2024 SS64.com
Some rights reserved