int = InnerPlanetTransitOnDate(nDate, nPlanet, nSunDataSourceIndex)
This macro function returns the time in millionths of a day when the specified inner planet nPlanet (Mercury or Venus) transits across the Sun on nDate, as seen from nSunDataSourceIndex.
➢The result is -1 if no transit occurs on nDate for planet nPlanet.
➢The transit maximum is calculated for the selected nSunDataSourceIndex, but the function does not require the Sun to be above the horizon from that location.
The returned time is local and expressed in millionths of a day.
The example below, calculates the time, if any, on the date of the macro token, when Venus is at maximum transit in front of the Sun.
sResult = ''
nTimeTimesMillion = InnerPlanetTransitOnDate(n_TokenDate, n_VENUS, 1)
if nTimeTimesMillion >= 0
// convert time to a string, rounding to the nearest minute
sTime = FormatTime('hh:nn', nTimeTimesMillion, true)
sResult = 'Maximal Venus solar transit at ' + sTime
endif
See also: PlanetaryEvent and planetary functions.
Topic 181075, last updated on 12-Oct-2026