LibreOffice 25.2 सहयोग
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 | पहिलो हप्ता भनेको जनवरीको पहिलो हो, पहिलो (पूर्वनिर्धारित) | 
| 2 | पहिलो हप्ता, त्यो वर्षको चार वा धेरै दिनहरू समावेश भएको पहिलो हप्ता हो | 
| 3 | पहिलो हप्ता नयाँ वर्षको दिनहरू मात्र समावेश भएको पहिलो हप्ता हो | 
Sub example_datediff
    MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
End Sub