You can use the DatePart function to evaluate a date/time value and return a specific component. For example, you might use DatePart to calculate the day of the week or the current hour.
If you choose DateInterval.Weekday for the Interval argument, the returned value is consistent with the values of the FirstDayOfWeek enumeration. If you choose DateInterval.WeekOfYear, DatePart uses the Calendar and CultureInfo classes of the System.Globalization namespace to determine your current settings.
The FirstDayOfWeekValue argument affects calculations that use the DateInterval.Weekday and DateInterval.WeekOfYear Interval settings. The FirstWeekOfYearValue argument affects calculations that specify DateInterval.WeekOfYear for Interval.
Since every Date value is supported by a DateTime structure, its methods give you additional options in retrieving date/time parts. For example, you can obtain the entire date value of a Date variable, with the time value set to midnight, as follows:
Dim CurrDatTim As Date = Now ' Current date and time.
Dim LastMidnight As Date = CurrDatTim.Date ' At midnight.