TIMST

TIMST returns a formatted date/time string.

This function is valid in both rules and TurboIntegrator processes.

Syntax

TIMST(datetime, format, ExtendedYears)

Argument

Modifier/

Description

datetime

A date/time serial number.

The integer part of the number specifies the date, and the decimal part specifies the time within the day. Day number 0 corresponds to '60-01-01'. Negative numbers correspond to prior years. Years in the 21st Century, up to 2059, are represented by years 00 through 59. An hour is 1/24th of a day, a minute 1/60th of an hour, and a second 1/60th of a minute.

format

A string that formats the result of the function. All the characters in the format argument appear in the result, except for the following characters, which return date/time component values:

 

\y

the last two digits of the year (97, 98, etc.)

 

\Y

the four digits of the year (1997, 1998, etc.)

 

\m

the two digits of the month (01 through 12)

 

\M

the abbreviation of the month (JAN, FEB, etc.)

 

\d

the two digits of the day (01 through 31)

 

\D

the digit of the day (1 through 31)

 

\h

the hour in military time (00 through 23)

 

\H

the standard hour (1 through 12)

 

\i

the minute (00 through 59)

 

\s

the second (00 through 59)

 

\p

a.m. or p.m.

ExtendedYears

This optional Boolean parameter specifies whether the function returns a date falling within the range 1960 - 2059 or 1960 - 9999.

If ExtendedYears is true, the function returns a date falling within the range of Jan. 1, 1960 and Dec. 31, 9999. Serial date 0 corresponds to Jan. 1, 1960 and serial date 2936549 corresponds to Dec. 31, 9999.

If ExtendedYears is false, or if this optional argument is omitted from the TIMST function, the function returns a date falling within the range Jan. 1, 1960 and Dec. 31, 2059. Serial date 0 corresponds to Jan 1, 1960 and serial date 36524 corresponds to Dec. 31, 2059.

If ExtendedYears is false or is omitted and you specify a serial date greater than 36524, the serial date used by the function is determined by the formula n - 36525. For example, if you specify a serial date of 36530, then 36530 - 36525 = 5. In this case, TIMST uses 5 as the serial date and returns the date Jan. 6, 1960.

Example

TIMST(366.0000, '\M \D, \Y') returns 'JAN 1, 1961'.

TIMST(366.5000, '\H\p \imin\ssec') returns '12p.m. 00min00sec'.

TIMST(366.1000, 'On \M \D, \Y at \H\p \imin\ssec') returns 'On JAN 1, 1961 at 2a.m. 24min00sec'.

TIMST(11111.1100, 'On \M \D, \Y at \H\p \imin\ssec') returns 'On JUN 3,1990 at 2a.m. 38min24sec'.