From aea0c3de6a458682698ce7f879faaaa0f4ef49f1 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Wed, 13 Jun 2012 15:53:55 +0200 Subject: add help for DATEDIF function Change-Id: I1af5ed59b187cb0c75f6ed0b704fee02230906a0 --- helpcontent2/source/text/scalc/01/04060102.xhp | 5 + helpcontent2/source/text/scalc/01/func_datedif.xhp | 104 +++++++++++++++++++++ helpcontent2/source/text/scalc/01/makefile.mk | 1 + helpcontent2/util/scalc/makefile.mk | 1 + 4 files changed, 111 insertions(+) create mode 100644 helpcontent2/source/text/scalc/01/func_datedif.xhp (limited to 'helpcontent2') diff --git a/helpcontent2/source/text/scalc/01/04060102.xhp b/helpcontent2/source/text/scalc/01/04060102.xhp index b53b1d6eae..8d4912fba1 100644 --- a/helpcontent2/source/text/scalc/01/04060102.xhp +++ b/helpcontent2/source/text/scalc/01/04060102.xhp @@ -111,6 +111,11 @@ +
+ + + +
diff --git a/helpcontent2/source/text/scalc/01/func_datedif.xhp b/helpcontent2/source/text/scalc/01/func_datedif.xhp new file mode 100644 index 0000000000..3dcf7775f7 --- /dev/null +++ b/helpcontent2/source/text/scalc/01/func_datedif.xhp @@ -0,0 +1,104 @@ + + + + + + + + +DATEDIF +/text/scalc/01/func_datedif.xhp + + + +DATEDIF function + +DATEDIF + +This function returns the number of whole days, months of years between Start date and End date. +Syntax +DATEDIF(Start date; End date; Interval) + +Start date is the date from when the calculation is carried out. + +End date is the date until the calculation is carried out. End date must be later, than Start date. + +Interval is a string, accepted values are "d", "m", "y", "ym", "md" or "yd". + + + +Value for "Interval"Do not translate the text values in this column below + + +Return value + + + + +"d" + + +Number of whole days between Start date and End date. + + + + +"m" + + +Number of whole months between Start date and End date. + + + + +"y" + + +Number of whole years between Start date and End date. + + + + +"ym" + + +Number of whole months when substracting years from the difference of Start date and End date. + + + + +"md" + + +Number of whole days when substracting years and months from the difference of Start date and End date. + + + + +"yd" + + +Number of whole days when substracting years from the difference of Start date and End date. + + +
+Example + +Birthday calculation. A man was born on 1974-04-17. Today is 2012-06-13. + +=DATE("1974-04-17";"2012-06-13";"y") yields 38. =DATE("1974-04-17";"2012-06-13";"ym") yields 1. =DATE("1974-04-17";"2012-06-13";"md") yields 27. So he is 38 years, 1 month and 27 days old. + +=DATE("1974-04-17";"2012-06-13";"m") yields 457, he has been living for 457 months. + +=DATE("1974-04-17";"2012-06-13";"d") yields 13937, he has been living for 13937 days. + +=DATE("1974-04-17";"2012-06-13";"yd") yields 57, his birthdays was 57 days ago. + +
diff --git a/helpcontent2/source/text/scalc/01/makefile.mk b/helpcontent2/source/text/scalc/01/makefile.mk index 5d4f0bd3ec..403d6968bd 100644 --- a/helpcontent2/source/text/scalc/01/makefile.mk +++ b/helpcontent2/source/text/scalc/01/makefile.mk @@ -197,6 +197,7 @@ XHPFILES = \ 12120300.xhp \ format_graphic.xhp \ func_date.xhp \ + func_datedif.xhp \ func_datevalue.xhp \ func_day.xhp \ func_days.xhp \ diff --git a/helpcontent2/util/scalc/makefile.mk b/helpcontent2/util/scalc/makefile.mk index 52343f40d2..9e8b6f6534 100644 --- a/helpcontent2/util/scalc/makefile.mk +++ b/helpcontent2/util/scalc/makefile.mk @@ -222,6 +222,7 @@ LINKLINKFILES= \ text$/scalc$/01$/12120300.xhp \ text$/scalc$/01$/format_graphic.xhp \ text$/scalc$/01$/func_date.xhp \ + text$/scalc$/01$/func_datedif.xhp \ text$/scalc$/01$/func_datevalue.xhp \ text$/scalc$/01$/func_day.xhp \ text$/scalc$/01$/func_days.xhp \ -- cgit