Julian Dates (OpenInsight 32-bit Specific)
At 03 DEC 2003 10:26:00PM Mark B wrote:
Hi all,
How do we convert an OI internal date to Julian Date format?
Thanks,
Mark
At 10 DEC 2003 11:21AM Gray Cunningham wrote:
Mark,
I don't believe that there is "built-in" way to Oconv a date into Julian Date format, but I could be wrong. I have always written my own routine that was specific to the requirement at hand. It isn't that difficult given the way OI & Arev store dates internally. Assuming that your date is already in internal format, the following code should work:
JulianDate=YourDate - (Iconv("01/01/" : Oconv(YourDate,"D4/")-4,4,"D")-1)
This gives you the "day-of-the-year"…if you also require the year itself in your Julian Date, you would have to append or prepend it to this value.
Hope this helps,
Gray Cunningham