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
숫자
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일이 포함된 주(기본값)가 주 1입니다. | 
| 2 | 해당 연도의 4일 이상이 포함된 첫째 주가 주 1입니다. | 
| 3 | 새로운 연도의 날짜만 포함된 첫째 주가 주 1입니다. | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub