Mega Code Archive

 
Categories / Delphi / ADO Database
 

0 dates and informix

Question: Informix documention says that if you assign 0 to a date the result should be 12/31/1899, yet if I assign a 0 to an Informix date in Delphi or C++ Builder, the result is 12/30/1899. How come? Answer: Delphi and C++ Builder assign a 0 based date to 12/30/1899. When they send the date to the server they do not send a zero but send a 12/30/1899 instead.