Page 1 of 1

Compare only Date and only Time

Posted: 07.01.2023, 16:03
by hemmingway
I want to compare only Date and only Time.
The patch is attached.

Greetings, Bernhard

Re: Compare only Date and only Time

Posted: 10.01.2023, 18:07
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