Date Formula Used In VIP (ViP Specific)
At 29 APR 1998 09:42:59AM Bart_Cowan@CRICATALYST.COM wrote:
I am currently storing the VIP date/time 8-byte floating-point value in my Btrieve database. My problem is that I need to also write date/time values from a "C" program to the Btrieve database. However, I am unable to figure out how to convert my date to your 8-byte floating-point value. Is there any way I can do this.
At 29 APR 1998 01:06PM John Averell Revelation wrote:
The ViP internal datetime is stored as a standard 8-byte double.
The integer part is the number of days from December 30, 1899. The fractional part is the fraction of a day from midnight (0.5=noon).
This is identical to the Lotus 1-2-3 format for datetime (but not Lotus Notes.)
(The peculiar day-zero was due to a mistake about 10 years ago at Lotus, when someone forgot that 1900 was not a leap-year.)
At 30 APR 1998 10:53AM Bart Cowan wrote:
Thanks for the info about the date format but I found that information in the manual. The manual shows that 0 is equal to 12/30/1899 and 1 would be equal to 12/31/1899. My problem lies with trying to figure out what value today would be. It would not be so diffucult if not for leap year. Remember I am trying to do this from a "C" program and am not able to use Lotus script functions.
At 30 APR 1998 02:14PM John Averell Revelation wrote:
Follow this link to find the algorithm to compute Julian Date.
http://www.magnet.ch/serendipity/hermetic/cal_stud/jdn.htm
You can code the difference between any two Gregorian dates to get the number of days between.