LibreOffice 24.8 Help
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
Číslo.
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 | Vysvetlenie | 
|---|---|
| 0 | Použiť prednastavenú systémovú hodnotu | 
| 1 | Nedeľa (prednastavená hodnota) | 
| 2 | Pondelok | 
| 3 | Utorok | 
| 4 | Streda | 
| 5 | Štvrtok | 
| 6 | Piatok | 
| 7 | Sobota | 
firstweekofyear: An optional parameter that specifies the starting week of a year.
| firstweekofyear value | Vysvetlenie | 
|---|---|
| 0 | Použiť prednastavenú systémovú hodnotu | 
| 1 | Týždeň 1 je týždeň, ktorý obsahuje 1. január (prednastavená hodnota) | 
| 2 | Týždeň 1 je prvý týždeň obsahujúci 4 alebo viac dní tohto roka | 
| 3 | Týždeň 1 je prvý týždeň obsahujúci iba dni tohto roka | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub