Unit 'DateUtils' Package
[Overview][Constants][Classes][Procedures and functions][Index] [#rtl]

DecodeDateDay

Decode a TDateTime value in year and year of day.

Declaration

Source position: dateutil.inc line 345

procedure DecodeDateDay(

  const AValue: TDateTime;

  out AYear: Word;

  out ADayOfYear: Word

);

Arguments

AValue

  

TDateTime to decode.

AYear

  

Returns the year part of AValue.

ADayOfYear

  

Returns the day-of-year part of AValue.

Description

DecodeDateDay decomposes the date indication in AValue and returns the various components in AYear, ADayOfYear.

See also

EncodeDateTime

  

Encodes a TDateTime value from all its parts.

EncodeDateMonthWeek

  

Encodes a year, month, week of month and day of week to a TDateTime value.

EncodeDateWeek

  

Encode a TDateTime value from a year, week and day of week triplet.

EncodeDateDay

  

Encodes a year and day of year to a TDateTime value.

DecodeDateTime

  

Decode a TDateTime value in a date and time value.

DecodeDateWeek

  

Decode a TDateTime value in a week of year and day of week.

DecodeDateMonthWeek

  

Decode a TDateTime value in a month, week of month and day of week.

Example

Program Example83;

{ This program demonstrates the DecodeDateDay function }

Uses SysUtils,DateUtils;

Var
  Y,DoY : Word;
  TS : TDateTime;

Begin
  DecodeDateDay(Now,Y,DoY);
  TS:=EncodeDateDay(Y,DoY);
  Writeln('Today is : ',DateToStr(TS));
End.

Documentation generated on: Dec 26 2024