On Fri, 08 Nov 2013 21:35:45 +0100, John Landmesser <joh...@online.de> wrote:

> Hi List,
> 
> i'm searching a pascal datetime function that simulates an Excel 
> function: "DateDif"
> 
> Excel for example knows the function DateDif that returns the number of 
> Years, month and days between Date1 and date2.
> 
> Date1 := 21.12.2012
> Date2 := 01.01.2013
> 
> Result would be: 0 years, 0 moths, 11 days

Try the DaysBetween function::
  http://www.freepascal.org/docs-html/rtl/dateutils/daysbetween.html

But, I am not sure how you will deal with "months between" unless you settle
on 31 days per month.

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to