[Overview][Constants][Procedures and functions] Reference for unit 'dateutils' (#rtl)

DayOfTheYear

Extracts the day of the year from a TDateTimevalue

Declaration

Source position: dateutil.inc line 177

function DayOfTheYear(

  const AValue: TDateTime

):Word;

Arguments

AValue

  

DateTime to extract the day of the year from.

Function result

Day of the year from AValue.

Description

DayOfTheYearreturns the number of days that have passed since the start of the year till the moment indicated by AValue. This is a one-based number, i.e. January 1 will return 1.

For an example, see the WeekOfTheYearfunction.

See also

WeekOfTheYear

  

Extract the week of the year (and optionally year) of a DateTime indication.

HourOfTheYear

  

Calculate the number of hours passed since the start of the year.

MinuteOfTheYear

  

Calculate the number of minutes elapsed since the start of the year

SecondOfTheYear

  

Calculate the number of seconds elapsed since the start of the year.

MilliSecondOfTheYear

  

Calculate the number of milliseconds elapsed since the start of the year.