LibreOffice 25.2 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 | សេចក្តីពន្យល់ | 
|---|---|
| ០ | ប្រើតម្លៃលំនាំដើមប្រព័ន្ធ | 
| ១ | ថ្ងៃអាទិត្យ (លំនាំដើម) | 
| ២ | ថ្ងៃច័ន្ទ | 
| ៣ | ថ្ងៃអង្គារ | 
| ៤ | ថ្ងៃពុធ | 
| ៥ | ថ្ងៃព្រហស្បតិ៍ | 
| ៦ | សុក្រ | 
| ៧ | សៅរ៍ | 
firstweekofyear: An optional parameter that specifies the starting week of a year.
| firstweekofyear value | សេចក្តីពន្យល់ | 
|---|---|
| ០ | ប្រើតម្លៃលំនាំដើមប្រព័ន្ធ | 
| ១ | សប្ដាហ៍១ គឺជាសប្ដាហ៍ដែលមាន ថ្ងៃទី១ ខែមករា (លំនាំដើម) | 
| ២ | សប្ដាហ៍១ គឺជាសប្ដាហ៍ទីមួយ ដែលមានបួន ឬច្រើនថ្ងៃនៃឆ្នាំនោះ | 
| ៣ | សប្ដាហ៍១ គឺជាសប្ដាហ៍ទីមួយ ដែលមានតែថ្ងៃនៃឆ្នាំថ្មី | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub