StartOfWeek Function
Returns the Start of the week containing given Date/Time, assumes that the Start of the Week is Sunday - Time portion preserved.

Unit
QESBPCSDateTime

Declaration
Function StartOfWeek(const DT: TDateTime): TDateTime;

Parameters
DT Date/Time to process.

Category
Date/Time Arithmetic Routines
Week Based Arithmetic Routines

Implementation

function StartOfWeek (const DT: TDateTime): TDateTime;
begin
     Result := DT - DayOfWeek (DT) + 1;
End;


HTML generated by Time2HELP
http://www.time2help.com