Sign in Join
FPDoc Onlineexperiment

DateOf function

In unit DateUtils

Extract the date part from a TDateTime indication.

Declaration

pascal
function DateOf(const AValue: TDateTime): TDateTime

Arguments

AValue

TDateTime with the date extracted in the routine.

Function result

Date part of AValue.

Description

DateOf extracts the date part from AValue and returns the result.

Since the TDateTime is actually a double with the date part encoded in the integer part, this operation corresponds to a call to Int.

See also

Example: ex1

pascal
Program Example1;

{ This program demonstrates the DateOf function }

Uses SysUtils,DateUtils;

Begin
  Writeln('Date is: ',DateTimeToStr(DateOf(Now)));
End.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.