Why default value for date is 0 ?
Posted: 24.02.2009, 17:06
Hi,
when I do a GetDate on a field which is null or egal to "0000-00-00", the GetDate method return me 0.
0 is not the default value for Delphi's date :
DateToStr(0) -> 30/12/1899
DateToStr(-700000) -> 00/00/0000
Also this constant (-700000) is always used to define a null date in Delphi.
Maybe the 0 is the default date value for others platforms that Delphi which Zeos is developped for but in this case a parameter would be perfect to pass from one default date to the other.
Thanks,
David
when I do a GetDate on a field which is null or egal to "0000-00-00", the GetDate method return me 0.
0 is not the default value for Delphi's date :
DateToStr(0) -> 30/12/1899
DateToStr(-700000) -> 00/00/0000
Also this constant (-700000) is always used to define a null date in Delphi.
Maybe the 0 is the default date value for others platforms that Delphi which Zeos is developped for but in this case a parameter would be perfect to pass from one default date to the other.
Thanks,
David