LibreOfficeDev 25.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 | བདུན་ཕྲག་ ༡་ འདི་སྤྱི་ཟླ་དང་པ་ ༡་ དང་ཅིག་ཁར་བདུན་ཕྲག་༡་པ་ཨིན (default) | 
| 2 | བདུན་ཕྲག་ ༡་ འདི་ཉིནམ་བཞི་ཡོད་པའི་བདུན་ཕྲག་དང་པ་ཡང་ན་ལོ་འདིའི་ཉིནམ་ལྷགཔ་ཨིན། | 
| 3 | བདུན་ཕྲག་ ༡་ འདི་ལོ་གསརཔ་གི་ཉིནམ་རྐྱངམ་ཅིག་ཡོད་པའི་བདུན་ཕྲག་དང་པ་ཨིན། | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub