TimeSerial

Return a time given an hour, minute, and second value.

Syntax
      TimeSerial ( hour, minute, second )

Key
   hour    The hour value (0 - 23).

   minute  The minute value (0 - 59).

   second  The second value (0 - 59).

The hour/minute/seconds can be numeric expressions.

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

Examples

Dim dtmSaved
dtmSaved = TimeSerial (23, 15, 00)

'Returns: 11:15:00 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.
DoEvents - Delay to allow the operating system to process other events.
TimeValue - Convert a string to a Time.


 
Copyright © 1999-2024 SS64.com
Some rights reserved