DatePart Function

BarruBiso assishshi badantinota barru kifile qolanno.

Syntax:


DatePart (interval As String, date As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Long

Qolote guma:

The extracted part for the given date.

Parameters:

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

interval (string value)

Tittirsha

yyyy

Diro

b

Bocuboco

a

Agana

d

Diri barra

l

Loosubarruwa

ll

Diri lamala

b

Barra

y

Saate

d

Daqiiqa

s

Sakonde


date - The date from which the result is calculated.

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

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_datepart
    MsgBox DatePart("ww", #12/31/2005#)
    MsgBox DatePart(date:=#1999-12-30#, interval:="q")
End Sub

Please support us!