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



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

DecodeDateTime

Decode a datetime value in a date and time value

Declaration

Source position: dateutil.inc line 302

procedure DecodeDateTime(

  const AValue: TDateTime;

  var AYear: Word;

  var AMonth: Word;

  var ADay: Word;

  var AHour: Word;

  var AMinute: Word;

  var ASecond: Word;

  var AMilliSecond: Word

);

Arguments

AValue

  

DateTime to decode

AYear

  

Returns the year part of AValue.

AMonth

  

Returns the month part of AValue.

ADay

  

Returns the day part of AValue.

AHour

  

Returns the hour part of AValue.

AMinute

  

Returns the minute part of AValue.

ASecond

  

Returns the second part of AValue.

AMilliSecond

  

Returns the millisecond part of AValue.

Description

DecodeDateTime decomposes the date/time indication in AValue and returns the various components in AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond

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

DecodeDateWeek

  

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

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

{ This program demonstrates the DecodeDateTime function }

Uses SysUtils,DateUtils;

Var
  Y,Mo,D,H,Mi,S,MS : Word;
  TS : TDateTime;

Begin
  DecodeDateTime(Now,Y,Mo,D,H,Mi,S,MS);
  TS:=EncodeDateTime(Y,Mo,D,H,Mi,S,MS);
  Writeln('Now is : ',DateTimeToStr(TS));
End.

Notes

 No notes exist for this page yet. 





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