Contents

# ཚེས་

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

This function is available since LibreOffice 3.6.

This function is part of the Open Document Format for Office Applications (OpenDocument) standard Version 1.2. (ISO/IEC 26300:2-2015)

### ཚུག་སྦྱོར།

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 that determines how the difference will be calculated. Possible values are "d", "m", "y", "ym", "md" or "yd" regardless of the current language settings.

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.

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 - Preferences Tools - Options - LibreOffice Calc - Formula, button Details... in section "Detailed Calculation Settings", Conversion from text to number list box.

Value for "Interval" | སླར་ལོག་གནས་གོང་
--- | ---
"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 subtracting years from the difference of Start date and End date.
"md" | Number of whole days when subtracting years and months from the difference of Start date and End date.
"yd" | Number of whole days when subtracting years from the difference of Start date and End date.

### དཔེར་བརྗོད་ཚུ།

Birthday calculation. A man was born on 1974-04-17. Today is 2012-06-13.

=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("1974-04-17";"2012-06-13";"d") yields 13937, he has been living for 13937 days.

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

འབྲེལ་བ་ཡོད་པའི་གནད་དོན།

DATEDIF wiki page.

Date & Time Functions

ཚེས་

[text/scalc/01/func_datedif.xhp#datedif not found].

གནས་སྡུད་གནས་གོང་།

ཉིནམ།

DAYS

DAYS360

DAYSINMONTH

DAYSINYEAR

EASTERSUNDAY

EDATE

ཨི་ཨོ་ཟླཝ།

ཆུ་ཚོད།

ISLEAPYEAR

[text/scalc/01/func_isoweeknum.xhp#isoweeknum not found].

སྐར་མ།

ཟླཝ་

MONTHS

NETWORKDAYS

NETWORKDAYS.INTL

ད་ལྟོ།

སྐར་ཆ།

དུས་ཚོད་

TIMEVALUE

ད་རེས་

WEEKDAY

WEEKNUM

WEEKNUM_ADD

[text/scalc/01/func_weeknum_ooo.xhp#weeknum_ooo not found].

WEEKS

WEEKSINYEAR

ཉིན་ལཱ་

WORKDAY.INTL

ལོ་

YEARFRAC

YEARS