Sign in Join
FPDoc Onlineexperiment

TimeOf function

In unit DateUtils

Extract the time part from a TDateTime indication.

Declaration

pascal
function TimeOf(const AValue: TDateTime): TDateTime

Arguments

AValue

TDateTime value with the time extracted in the routine.

Function result

Time part of AValue.

Description

TimeOf extracts the time part from AValue and returns the result.

Since the TDateTime is actually a double with the time part encoded in the fractional part, this operation corresponds to a call to Frac.

See also

Example: ex2

pascal
Program Example2;

{ This program demonstrates the TimeOf function }

Uses SysUtils,DateUtils;

Begin
  Writeln('Time is : ',TimeToStr(TimeOf(Now)));
End.

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