DATEDIF

This function returns the number of whole days, months or years between Start date and End date.

tip

See funktsioon on saadaval alates LibreOffice'i versioonist 3.6


S√ľntaks

DATEDIF(alguskuup√§ev; l√Ķppkuup√§ev; ajavahemik)

Alguskuupäev on päev, millest arvutamist alustada.

L√Ķppkuup√§ev on p√§ev, milleni arvutada. L√Ķppkuup√§ev peab olema hilisem kui alguskuup√§ev.

Ajavahemik on string, mille v√§√§rtuseks v√Ķib olla "d", "m", "y", "ym", "md" v√Ķi "yd".

note

When entering dates as part of formulas, slashes or dashes used as date separators are interpreted as arithmetic operators. Therefore, dates entered in this format are not recognized as dates and result in erroneous calculations. To keep dates from being interpreted as parts of formulas use the DATE function, for example, DATE(1954;7;20), or place the date in quotation marks and use the ISO 8601 notation, for example, "1954-07-20". Avoid using locale dependent date formats such as "07/20/54", the calculation may produce errors if the document is loaded under different locale settings.


tip

Unambiguous conversion is possible for ISO 8601 dates and times in their extended formats with separators. If a #VALUE! error occurs, then unselect Generate #VALUE! error in - LibreOffice Calc - Formula, button Details... in section "Detailed Calculation Settings", Conversion from text to number list box.


"Ajavahemiku" väärtus

Tagastusväärtus

"d"

Alguskuup√§eva ja l√Ķppkuup√§eva vahele j√§√§vate t√§isp√§evade arv.

"m"

Alguskuup√§eva ja l√Ķppkuup√§eva vahele j√§√§vate tervikkuude arv.

"y"

Alguskuup√§eva ja l√Ķppkuup√§eva vahele j√§√§vate t√§isaastate arv.

"ym"

Alguskuup√§eva ja l√Ķppkuup√§eva vahele j√§√§vate tervikkuude arv, kui aastaarvude erinevust mitte arvestada.

"md"

Alguskuup√§eva ja l√Ķppkuup√§eva vahele j√§√§vate t√§isp√§evade arv, kui aastaarvude ja kuude erinevust mitte arvestada.

"yd"

Alguskuup√§eva ja l√Ķppkuup√§eva vahele j√§√§vate t√§isp√§evade arv, kui aastaarvude erinevust mitte arvestada.


Näide

Vanuse arvutamine. Keegi s√ľndis 17.04.1974. T√§na on 13.06.2012.

=DATEDIF("1974-04-17";"2012-06-13";"y") yields 38.

=DATEDIF("1974-04-17";"2012-06-13";"ym") yields 1.

=DATEDIF("1974-04-17";"2012-06-13";"md") yields 27.

So he is 38 years, 1 month and 27 days old.

=DATEDIF(DATE(1974,4,17);"2012-06-13";"m") yields 457, he has been living for 457 months.

=DATEDIF("17.04.1974";"13.06.2012";"d") annab tulemuseks 13937, seega on ta elanud 13937 päeva.

=DATEDIF("1974-04-17";DATE(2012;06;13);"yd") yields 57, his birthday was 57 days ago.

Palun toeta meid!