Please enable JavaScript to view this site.

 

str = FormatTime(sFormat,nTimeTimesMillion,bRoundMinutes)

 

This macro function converts the time nTimeTimesMillion into a string using the format sFormat.

 

The time of the day for the calculation is given by nTimeTimesMillion which is the portion of the day expressed in one millionth of a day (less than 1/10th of a second). Traditionally, astrological and astronomical events that are true or false on a date, are evaluated at the end of the day (ie. 23:59:59).

sNoon = FormatTime('hh:nn'500000, true) // 12:00
sSixPM = FormatTime('hh:nn'750000, true) // 18:00
sSixPM = FormatTime('h:nn'750000, true) // 6:00 pm

For a list of the allowed values of , see the topic on time formatting.

 

To include text whose letters you do not wish to have interpreted, such as "Printed on:", include that text in double quotes within the format string.

 

See also: FormatDate.

 


Topic 177650, last updated on 18-Apr-2020