Using dates in a DLL you program yourself

You can pass the bar date/time to a DLL just by specifying that parameter “AS date” when you describe the DLL parameter in the “External DLL call” indicator. Dates are double float where the whole part is the date and the fractional part is the time. Dates are in Julian format where 1 is January 1, 1900. The time is just the fraction of the day so 1/24 = 1 hour, 1/1440 = 1 minute, etc. Therefore January 3, 1900 at 9am would be 3.375. June 1, 2004 at 4:10 PM would be 38139 + 16/24 + 10/1440 = 38139.67361111. Note that there could be precision and rounding issues involved in these floating point numbers.

Was this article helpful?

Related Articles