Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TryEncodeTime

Try to encode a time, and indicate success.

Declaration

Source position: datih.inc line 118

function TryEncodeTime(

  Hour: Word;

  Min: Word;

  Sec: Word;

  MSec: Word;

  out Time: TDateTime

):Boolean;

Description

TryEncodeTime will check the validity of the Hour, Min, Sec and MSec arguments, and will encode them in a TDateTime value which is returned in Time. If the arguments are valid, then True is returned, otherwise False is returned.

Errors

None. If an error occurs during the encoding, False is returned.

See also

EncodeTime

  

Encode a Hour,Min,Sec,millisec to a TDateTime value.

DecodeTime

  

Decode a TDateTime to a hour,minute,second,millisec quartet.

TryEncodeDate

  

Try to encode a date, and indicate success.


Documentation generated on: Jul 24 2023