LibreOffice 24.8 Yardım
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
Bir sayı.
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 | Açıklama | 
|---|---|
| 0 | Sistem varsayılan değerini kullan | 
| 1 | Pazar (varsayılan) | 
| 2 | Pazartesi | 
| 3 | Salı | 
| 4 | Çarşamba | 
| 5 | Perşembe | 
| 6 | Cuma | 
| 7 | Cumartesi | 
firstweekofyear: An optional parameter that specifies the starting week of a year.
| firstweekofyear value | Açıklama | 
|---|---|
| 0 | Sistem varsayılan değerini kullan | 
| 1 | Hafta 1 Ocak ayının haftasıdır, 1inci (varsayılan) | 
| 2 | Hafta 1 yılın dört veya daha fazla gününü içeren ilk haftasıdır | 
| 3 | Hafta 1 sadece yeni yılın günlerini içeren ilk haftadır | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub