Please enable JavaScript to view this site.

 

int = MillionFromHMS(nHrs,nMins,nSecs)

 

This macro function takes in values for nHrs, nMins, nSecs and returns a number which is the portion of the day expressed in one millionth of a day (for example, 6am is 250000, noon is 500000, and 6pm is 750000).

 

For a clock time, use nHrs from 0 to 23 and nMins and nSecs from 0 to 59. The time is rounded to the nearest integer millionth of a day. The inverse functions round the encoded time to the nearest whole second before extracting its components, so a valid whole-second time converts back to the same hours, minutes and seconds. The end-of-day convention below is preserved.

 

➢One millionth of a day is less than 1/10th of a second.

 

If you call this function with the triplet values 23,59,59 for nHrs, nMins, nSecs, then the return value will be 1000000 (instead of 999988).

 

See also: HoursFromMillion, MinutesFromMillion and SecondsFromMillion.

 


Topic 179980, last updated on 11-Oct-2026