TimeJulianDay

Returns the Julian day given a datetime.

Syntax:

TimeJulianDay(datetime)

Parameters:

(s) datetime use format YYYY:MM:DD.

Returns:

(i) the Julian day.

 

Use this function to return the Julian date given a datetime. The Julian date is often used in banking and similar calculations as it provides an easy way to compute the difference between two dates.

 

Note: Julian date 1= Jan.1,0000.

 

Example:


;This example grabs the Time/Day of the Week.
a=TimeYmdHms( )
b=TimeJulianDay(a)
c=(b+5) mod 7
day=ItemExtract(c+1, "Sun Mon Tue Wed Thu Fri Sat", " ")
line=StrCat("Julian Date-> ", b,@CRLF,"Day of week-> ",day)
Message(TimeDate( ), line)
See Also:

FileTimeGet, FileTimeGetEx, TimeDate, TimeAdd, TimeDiffDays, TimeYmdHms, TimeDelay, TimeWait, TimeJulToYmd