DatePart Function [Runtime]/text/sbasic/shared/03030130.xhpDatePartDatePart functionDatePart Function [Runtime]The DatePart function returns a specified part of a date.Syntax:DatePart (Add, Date [, Week_start [, Year_start]])Return value:A Variant containing a date.Parameters:Add - A string expression from the following table, specifying the date interval.Date - The date from which the result is calculated.Example:Sub example_datepartmsgbox DatePart("ww", "12/31/2005")End Sub