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གི་རེས་གཟའ་ཚུད་(ཁས་ལེན་) | 
| 2 | གཟའ་འཁོར་དང་པོ་ནི་ལོ་དེའི་ཉིན་བཞི་ཡན་ཆོད་ཀྱི་ཉིན་གྲངས་ཀྱི་གཟའ་འཁོར་དང་པོ་ཚུད་ཡོད་ | 
| 3 | གཟའ་འཁོར་དང་པོ་ནི་ལོ་གསར་པའི་ཉིན་འགའི་གཟའ་འཁོར་དང་པོ་ཁོ་ནར་གཏོགས་ | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub