Why default value for date is 0 ?

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
ddantoni
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 17.10.2005, 15:15

Why default value for date is 0 ?

Post by ddantoni »

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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

David,
This is something we should have a look at. I can't do it right now and I'll forget about it. It would be better if you made a bug tracker issue for it.

I should try to figure out how the fpc rtl and lazarus handle dates as well. So this might take some time. There are 2 probably related bugs tracked recently. Might help when they are handled together.

Mark
Image
ddantoni
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 17.10.2005, 15:15

Post by ddantoni »

Hi Mark,
I posted my first bug report: http://zeosbugs.firmos.at/view.php?id=171
I hope my description is enough clear.

Thanks,
David
Post Reply