Function Dates Times Class

MoonPhase

Returns the phase of the moon as a number between 0 and 7. Use the MoonPhaseName function to determine the name for the moon phase.

Signature (Visual Basic / VBA)

Public Function MoonPhase( _
    ByVal vDate As Variant _
    ) As Variant

Code Example

    MoonPhase(#11/12/1999#) = 0
    MoonPhaseName(0) = "New Moon"
    MoonPhase(#12/25/1999#) = 4
    MoonPhaseName(4) = "Full Moon"

Parameters

Parameter Description
vDate The date whose moon phase is returned. Function returns Null if vDate is Null or cannot be fixed up to a Date.

Notes & Version History

v2.0 Addition This function is new to this version of Entisoft Tools.