[Lazarus] DateDif function needed

Benito van der Zander benito at benibela.de
Sat Nov 9 20:11:59 CET 2013


 >if you have stored dates in year, month, day... format.
 >Each comparison then needs multiple convertions each time.

nonsense.

Store it as packed record word-byte-byte = int and you have faster 
comparisons than TDateTime!

On 11/09/2013 04:23 PM, Jürgen Hestermann wrote:
>
> Am 2013-11-09 13:43, schrieb Michael Van Canneyt:
>> So what ? Do an EncodeDate() and you're all set.
>>
> That would be a real performance hit (i.e. when sorting by date)
> if you have stored dates in year, month, day... format.
> Each comparison then needs multiple convertions each time.
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list