RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.DecodeDateMonthWeek Function

Returns the year, month, week of the month, and day of the week for a specified TDateTime.

Pascal
procedure DecodeDateMonthWeek(const AValue: TDateTime; out AYear: Word; out AMonth: Word; out AWeekOfMonth: Word; out ADayOfWeek: Word);
C++
DecodeDateMonthWeek(const TDateTime AValue, Word AYear, Word AMonth, Word AWeekOfMonth, Word ADayOfWeek);

DecodeDateMonthWeek returns the day of the week and week of the month for a specified date/time value, along with the month and year in which that day and week occur. 

AValue is the date/time value about which you want information. 

AYear returns the year that AValue represents. 

AMonth returns the month that AValue represents, where 1 is January and 12 is December. 

AWeekOfMonth returns the week within AMonth that AValue represents, where 1 is the first week with four or more days. 

ADayOfWeek returns the day within AWeekOfMonth that AValue represents, where 1 Monday and 7 is Sunday.

Note: The definitions for AWeekOfMonth and ADayOfWeek reflect the ISO 8601 standard.
Tip: To make the ADayOfWeek value more readable, use the day of week constants.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!