LibreOfficeDev 25.8 Help
kAC7A‖Returns the number of date or time intervals between two given date values.
AzmeS‖DateDiff (interval As String, date1 As Date, date2 As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Double
BXncY‖A number.
uEH2f‖ interval - A string expression from the following table, specifying the date or time interval.
KvjGL‖ date1, date2 - The two date values to be compared.
hjbSu‖ firstdayofweek: An optional parameter that specifies the starting day of a week.
| wpCoP‖firstdayofweek value | gmaR8‖Explanation | 
|---|---|
| A5RkW‖0 | Xt9Xx‖Use system default value | 
| 6UMdD‖1 | uV8iz‖Sunday (default) | 
| zuFMX‖2 | vUz3C‖Monday | 
| 2YAp3‖3 | KCW5A‖Tuesday | 
| 8rkEA‖4 | hhEsB‖Wednesday | 
| 3F47C‖5 | Zv7Dn‖Thursday | 
| aP5Bd‖6 | EbThD‖Friday | 
| CmnqZ‖7 | BjBfG‖Saturday | 
UFDDA‖ firstweekofyear: An optional parameter that specifies the starting week of a year.
| e3gQd‖firstweekofyear value | zAFFS‖Explanation | 
|---|---|
| XEzpc‖0 | jXczC‖Use system default value | 
| sqUf8‖1 | 65vhA‖Week 1 is the week with January, 1st (default) | 
| 7KXnC‖2 | wFZe8‖Week 1 is the first week containing four or more days of that year | 
| 85UKo‖3 | xAkGk‖Week 1 is the first week containing only days of the new year | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub