DatePart Function/text/sbasic/shared/03030130.xhpDatePart function
DatePart Function
The DatePart function returns a specified part of a date.DatePart (interval As String, date As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As LongReturn value:The extracted part for the given date.interval - A string expression from the following table, specifying the date interval.date - The date from which the result is calculated.Sub example_datepart MsgBox DatePart("ww", #12/31/2005#) MsgBox DatePart(date:=#1999-12-30#, interval:="q")End Sub