Sign in Join
FPDoc Onlineexperiment

EndOfTheDay function

In unit DateUtils

Calculate a TDateTime value that represents the end of a given day.

Declaration

pascal
function EndOfTheDay(const AValue: TDateTime): TDateTime

Arguments

AValueTDateTime value used in the calculation.

Function result

A TDateTime value representing the time 23:59:59.999 of the day AValue.

Description

EndOfTheDay extracts the date part of AValue and returns a TDateTime value with the date/time indication of the last moment (23:59:59.999) of this day.

See also

Example: ex37

pascal
Program Example37;

{ This program demonstrates the EndOfTheDay function }

Uses SysUtils,DateUtils;

Const
  Fmt = '"End of the day : "dd mmmm yyyy hh:nn:ss';


Begin
  Writeln(FormatDateTime(Fmt,EndOfTheDay(Today)));
End.

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