RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.StartOfTheWeek Function

Returns a TDateTime that represents 12:00:00:00 AM on the first day of the week identified by a specified TDateTime.

Pascal
function StartOfTheWeek(const AValue: TDateTime): TDateTime;
C++
TDateTime StartOfTheWeek(const TDateTime AValue);

DateUtils

StartOfTheWeek returns the first expressible moment of the same week as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 0, changes the day to Monday, and returns the result.

Note: StartOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!