RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.DayOfTheYear Function

Returns the number of days between a specified TDateTime value and December 31 of the previous year.

Pascal
function DayOfTheYear(const AValue: TDateTime): Word;
C++
Word DayOfTheYear(const TDateTime AValue);

Call DayOfTheYear to obtain the ordinal position of a TDateTime value's day within its year. Thus, a TDateTime value that refers to January 1 generates a result of 1, dates on January 2 return 2, dates on February 1 return 32, and so on. 

 

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