RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.EncodeDateDay Function

Returns a TDateTime that represents a specified day of the year for a specified year.

Pascal
function EncodeDateDay(const AYear: Word; const ADayOfYear: Word): TDateTime;
C++
TDateTime EncodeDateDay(const Word AYear, const Word ADayOfYear);

DateUtils

EncodeDateDay returns a TDateTime for the date specified by the AYear and ADayOfYear parameters. The time portion of the return value is 0 (Midnight at the start of the specified day). 

AYear is the year. It can be any value between 1 and 9999 (inclusive). 

ADayOfYear is the day of the year, where 1 is January , 2 is January 2, 32 is February 1, and so on. 

If AYear is not within range, or if ADayOfYear is less than 1 or greater than the number of days in AYear, EncodeDateDay raises an EConvertError exception. 

 

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