Show: Object Pascal C++
Display Preferences

System.SysUtils.EncodeTime

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function EncodeTime(Hour, Min, Sec, MSec: Word): TDateTime;

C++

extern DELPHI_PACKAGE System::TDateTime __fastcall EncodeTime(System::Word Hour, System::Word Min, System::Word Sec, System::Word MSec);

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Returns a TDateTime value for a specified Hour, Min, Sec, and MSec.

EncodeTime encodes the given hour, minute, second, and millisecond into a TDateTime value.

Valid Hour values are 0 through 23.

Valid Min and Sec values are 0 through 59.

Valid MSec values are 0 through 999.

If the specified values are not within range, EncodeTime raises an EConvertError exception.

The resulting value is a number between 0 and 1 (inclusive) that indicates the fractional part of a day given by the specified time or (if 1.0) midnight on the following day. The value 0 corresponds to midnight, 0.5 corresponds to noon, 0.75 corresponds to 6:00 P.M., and so on.

See Also


Code Examples

Personal tools
Translations