You are here: Function Reference > Alphabetical Listing > T > Time

Time

Use this function to build a time from a given time, or the current time.

Syntax

Time (Format, Hour, Minutes, Seconds)

Parameter

Description

Format

Enter a time format string. The default is time format 1 (HH:MM:SS).

Hour

Enter a number to indicate the hour. The default is the current hour.

Minutes

Enter a number to indicate the minute. The default is the current minute.

Seconds

Enter a number to indicate the second. The default is the current second.

The system returns a time string that contains a formatted time value.

If you omit one of the Hour, Minute, or Seconds parameters, the system uses the appropriate value from the current time.

Example

Here are some examples:

(Assume the current time is 07:07:32 am.)

Function

Result

Explanation

Time( )

07:07:32

No parameters entered. It defaults to the current time in format 1.

Time(2,13,30,5)

01:30:05 PM

Format 2 selected; time displays in 12-hour format using these values.

See also