Time Function

Returns a time as a formatted string value.

Time ( [Time] [, format])

Parameters

Time  -  (Input, expression, Optional)

The time value to return. If time is specified as a string expression, Newlook will convert it to a date/time as long as it contains a date and/or time in the form “mmm d, yyyy” (e.g. “Feb 1, 1999”) and “hh:nn:ss”. If no time is given, then the current system date/time is assumed.

Format- (Input, expression, Option) 

The formatting string to return the date in (see the options for the Date function). If no format is given, the default time format is “hh:nn:ss”.

Return Value

A string containing the formatted date or Error if time is not a valid date/time.

Examples

Time ()

Returns current time (default format)

Time (Now())

Returns current time (default format)

Time (Now(), “HH:nn am/pm”)

Returns current time in HH:nn am/pm format

Time (Error)

Returns Error

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See Also

Date function | DateAdd function | DateDiff function | Day function | Hour function | Minute function | Month function | Now function | Second function | Time function | Week function | WeekDay function | Year function


© 2004-2021 looksoftware. All rights reserved.