help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

DecodeDateWeek

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

Declaration

Source position: dateutil.inc line 311

procedure DecodeDateWeek(

  const AValue: TDateTime;

  var AYear: Word;

  var AWeekOfYear: Word;

  var ADayOfWeek: Word

);

Arguments

AValue

  

DateTime to decode

AYear

  

Returns the year part of AValue.

AWeekOfYear

  

Returns the week of year part of AValue.

ADayOfWeek

  

Returns the day of week part of AValue.

Description

DecodeDateWeek decomposes the date indication in AValue and returns the various components in AYear, AWeekOfYear, ADayOfWeek.

See also

EncodeDateTime

  

Encodes a DateTime value from all its parts

EncodeDateMonthWeek

  

Encodes a year, month, week of month and day of week to a DateTime 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 DateTime value

DecodeDateTime

  

Decode a datetime value in a date and time value

DecodeDateDay

  

Decode a DateTime value in year and year of day.

DecodeDateMonthWeek

  

Decode a DateTime value in a month, week of month and day of week

Example

Program Example81;

{ This program demonstrates the DecodeDateWeek function }

Uses SysUtils,DateUtils;

Var
  Y,W,Dow : Word;
  TS : TDateTime;

Begin
  DecodeDateWeek(Now,Y,W,Dow);
  TS:=EncodeDateWeek(Y,W,Dow);
  Writeln('Today is : ',DateToStr(TS));
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505