Compare only Date and only Time

Freature requests from users for ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Post Reply
hemmingway
Fresh Boarder
Fresh Boarder
Posts: 21
Joined: 20.01.2010, 13:51

Compare only Date and only Time

Post by hemmingway »

I want to compare only Date and only Time.
The patch is attached.

Greetings, Bernhard
You do not have the required permissions to view the files attached to this post.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Compare only Date and only Time

Post by marsupilami »

Hello Hemmingway,

out of curiosity: what is the situation where this leads to problems? Could you give me some information about how to provoike a bug without this patch?

For columns of type stDate we expect the time part to be 0, so no problem should arise?

Also - for columns of type stTime we expect the date part to be 0 so also - we shouild not see a problem there.

So in all cases using ZCompareDateTime should lead to valid results?

Also using TDate and TTime leads to problems on Databases like MySQL where parts of the date can be 0. This is why Egonhugeist Introduced the TTZDateTime datatype. Why don't you use the existing ZCompareDate and ZCompareTime functions?

Best regards,

Jan
Post Reply