Sign in Join
FPDoc Onlineexperiment

StartOfTheDay function

In unit DateUtils

Calculate the start of the day as a TDateTime value, given a moment in the day.

Declaration

pascal
function StartOfTheDay(const AValue: TDateTime): TDateTime

Arguments

AValue

TDateTime from which to calculate start of the day.

Function result

Start of the day (00:00) as a TDateTime value.

Description

StartOfTheDay extracts the date part of AValue and returns a TDateTime value with the date/time indication of the start (0:0:0.000) of this day.

See also

Example: ex36

pascal
Program Example36;

{ This program demonstrates the StartOfTheDay function }

Uses SysUtils,DateUtils;

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


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

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