[Lazarus] DateDif function needed

Michael Van Canneyt michael at freepascal.org
Sat Nov 9 13:43:11 CET 2013

On Sat, 9 Nov 2013, J├╝rgen Hestermann wrote:

> Am 2013-11-09 12:12, schrieb Michael Van Canneyt:
>> The dateutils unit contains DaysBetween, MinutesBetween, HoursBetween, etc.
>> Each function exists in 2 variants: one which takes partial times, another 
> which does complete days/hours/minutes.
>> See
>> http://www.freepascal.org/docs-html/rtl/dateutils/index-5.html
>> For the documentation.
> I can't find any functions that take year/month/date as arguments.
> The documentation only mentions TDateTime parameters.
> (i.e. http://www.freepascal.org/docs-html/rtl/dateutils/daysbetween.html )

So what ? Do an EncodeDate() and you're all set.
Excel also uses TDateTime, that's where the format comes from.


More information about the Lazarus mailing list