int = SecondsFromMillion(nTimeTimesMillion)
This macro function returns the seconds (from 0-59) corresponding to the time nTimeTimesMillion.
➢The number nTimeTimesMillion is the portion of the day expressed in one millionth of a day (less than 1/10th of a second).
The macro code below extracts the hours, minutes and seconds from the time obtained for a Moon phase.
nNewMoonTime = MoonPhaseAndTimeOf(n_TokenDate,1,false)
if (nNewMoonTime > 0)
nHrs = HoursFromMillion(nNewMoonTime)
nMins = MinutesFromMillion(nNewMoonTime)
nSecs = SecondsFromMillion(nNewMoonTime)
sResult = 'Moon phase at '+IntToStr(nHrs)+':'+IntToStr(nMins)+':'+IntToStr(nSecs)
To avoid confusion between the midnight at the beginning of the day, and the midnight at the end of the day, a value of 1000000 for nTimeTimesMillion will be converted to 23:59:59.
See also: HoursFromMillion, MinutesFromMillion, MillionFromHMS
Topic 179975, last updated on 18-Apr-2020