January 1, 2005

WinTask - JulianDayNumber

'
' JulianDayNumber (JDN) - Return the Julian Day Number given a Gregorian Date
'
' The JDN for 11/16/1858 is 2400000
'
' Author - Joe Strazzere
'

Function JulianDayNumber(MyDate$)
     JulianDayNumber = DateBetween("d","11/16/1858",MyDate$) +2400000
EndFunction

MsgBox(JulianDayNumber("03/31/1996"))

MsgBox(JulianDayNumber(Date$()))