Function Dates Times Class

JulianDate

Return the Julian Date given a year, month, and day of month. Similar to the JulianDay function, but correctly handles pre-1752 dates.

Signature (Visual Basic / VBA)

Public Function JulianDate( _
      ByVal vYear As Variant _
    , ByVal vMonth As Variant _
    , ByVal vDay As Variant _
    ) As Variant

Code Example

    JulianDay(1965, 1, 1) = 2438762
    JulianDay(1899, 1, 1) = 2414656
    JulianDay(1776, 7, 4) = 2369916

Parameters

Parameter Description
vYear Must use the full four-digit year; cannot use 96, for example, to mean 1996. Function returns Null if vYear is Null or cannot be interpreted as an integer number.
vMonth Month in the year vYear. Function returns Null if vMonth is Null or cannot be interpreted as an integer number.
vDay Day in the month vMonth. Function returns Null if vDayis Null or cannot be interpreted as an integer number.

Notes & Version History

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