Справка LibreOffice 25.2
Returns the number of date or time intervals between two given date values.
DateDiff (interval As String, date1 As Date, date2 As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Double
Число.
interval - A string expression from the following table, specifying the date or time interval.
date1, date2 - The two date values to be compared.
firstdayofweek: An optional parameter that specifies the starting day of a week.
| firstdayofweek value | Описание | 
|---|---|
| 0 | Используется системное значение по умолчанию | 
| 1 | Воскресенье (по умолчанию) | 
| 2 | Понедельник | 
| 3 | Вторник | 
| 4 | Среда | 
| 5 | Четверг | 
| 6 | Пятница | 
| 7 | Суббота | 
firstweekofyear: An optional parameter that specifies the starting week of a year.
| firstweekofyear value | Описание | 
|---|---|
| 0 | Используется системное значение по умолчанию | 
| 1 | Неделя 1 — неделя, которая содержит 1 января (по умолчанию) | 
| 2 | Неделя 1 — первая неделя, в которой содержится не менее четырёх дней данного года | 
| 3 | Неделя 1 — первая неделя, в которой содержатся только дни нового года | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub