Contents

# DateDiff Function

Returns the number of date or time intervals between two given date values.

### Syntax:

    DateDiff (interval As String, date1 As Date, date2 As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Double

## Qolote guma:

Kiiro.

### Parameters:

interval - A string expression from the following table, specifying the date or time interval.

interval (string value) | Tittirsha
--- | ---
yyyy | Diro
q | Bocuboco
m | Agana
y | Diri barra
w | Loosubarruwa
ww | Diri lamala
d | Barra
h | Saate
n | Daqiiqa
s | Sakonde

date1, date2 - The two date values to be compared.

Date literals allow to specify unambiguous date variables that are independent from the current language. Literals are enclosed between hash signs #. Possible formats are:

- #yyyy-mm-dd#

- #mm/dd/yyyy#

firstdayofweek: An optional parameter that specifies the starting day of a week.

firstdayofweek value | Xawishsha
--- | ---
0 | Amuraatu gadimmate guma horonsi'ri
1 | Sambata(gadimma)
2 | Sanyo
3 | Masanyo
4 | Roowe
5 | Hamuse
6 | Arbe
7 | Qidaame

firstweekofyear: An optional parameter that specifies the starting week of a year.

firstweekofyear value | Xawishsha
--- | ---
0 | Amuraatu gadimma guma horonsiri
1 | Lamala 1 arfaasa lamalaati, 1ha (gade)
2 | Lamala 1 dirunnita shoole woy shoolete ale barruwa amaddanno umi lamalaati
3 | Lamala 1 haaru diri barruwa calla amadanno umi lamalaati

### Example:

    Sub example_datediff
        MsgBox DateDiff("d", #1/1/2005#, #2005-12-31#)
    End Sub

Please support us!