DateToJulian Function

Top  Previous  Next

Returns the number of days since 1900 for a given date. It is useful for calculating the number of days between two dates.

 

Syntax

 

value = DateToJulian( expression )

 

Parameters

expression

 

any expression that resolves to a date in the format YYYYMMDD

 

 

 

returns

 

the number of days since 1900 for the given date

 

Examples

 

daysBetween = DateToJulian( instrument.tradeExitDate ) -

       DateToJulian( instrument.date )