DelphiBasics
SecsPerDay
Constant
Gives the number of seconds in a day SysUtils unit
  const SecsPerDay = 86400;
Description
The SecsPerDay constant gives the number of seconds in a day (24 * 60 * 60 = 86400).
Related commands
DaysInAMonth Gives the number of days in a month
DaysInAYear Gives the number of days in a year
MinsPerDay Gives the number of minutes in a day
MonthDays Gives the number of days in a month
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 Download this web site as a Windows program.




 
Example code : Show the number of minutes and seconds in a week
// Full Unit code.
// -----------------------------------------------------------
// You must store this code in a unit called Unit1 with a form
// called Form1 that has an OnCreate event called FormCreate.
 
unit Unit1;
 
interface
 
uses
  SysUtils,   // Unit containing the SecsPerDay command
  Forms, Dialogs;
 
type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  end;
 
var
  
Form1: TForm1;
 
implementation
{$R *.dfm} // Include form definitions
 
procedure TForm1.FormCreate(Sender: TObject);

begin
  ShowMessage('Number of minutes in a week = '+IntToStr(MinsPerDay*7));
  ShowMessage('Number of seconds in a week = '+IntToStr(SecsPerDay*7));
end;
 
end.
Hide full unit code
   Number of minutes in a week = 10080
   Number of seconds in a week = 604800
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Home Page