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);

DateUtils

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) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!