[Lazarus] DateDif function needed

John Landmesser JohnML at online.de
Thu Nov 14 13:48:46 CET 2013


On 14.11.2013 10:50, Reimar Grabowski wrote:
> For MySQL:
>
> DATEDIFF(expr1,expr2)
>
> DATEDIFF() returns expr1 – expr2 expressed as a value in days from one
> date to the other. expr1 and expr2 are date or date-and-time
> expressions. Only the date parts of the values are used in the
> calculation.
>
> :)
>
> R.

... be carefull!

Databases as MySQL or FirebIrd or Oracle have a buildin function 
DateDiff, but the result is different!!

"Our" function delivers the age of a person in years, months, days.

The other datediff function delivers years OR month OR days.

So you can't use them to calculate the age of a person for example!!




More information about the Lazarus mailing list