Julian date

Results 1 to 2 of 2

Thread: Julian date

  1. #1
    Phill Miller Guest

    Default Julian date

    Are there any intrinsic functions or objects that can be used to retrieve the julian date?

  2. #2
    Join Date
    Dec 1969

    Default RE: Julian date

    I presume you mean "which day of the current year is it, counting Jan 1st as day 1 and Dec 31st as day 365/366?"<BR><BR>(I hope you aren&#039t asking for a date on the old Julian Calendar.)<BR><BR>Anyway, if so, then DateDiff should do it for you:<BR><BR>&#060;%<BR>Function JulianDay( theDate )<BR>&nbsp;&nbsp;&nbsp;&nbsp;Dim startFrom<BR>&nbsp;&nbsp;&nbsp;&nbsp;startFrom = CDate( "December 31, " & (Year(theDate) - 1) )<BR>&nbsp;&nbsp;&nbsp;&nbsp;JulianDay = DateDiff( "y", startFrom, theDate )<BR>End Function<BR>%&#062;<BR><BR>In other words, build up a string representing Dec 31 of the prior year and ask DateDiff for the number of days from then to the date in question.<BR><BR>Okay?<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts