ibec_EncodeDate

Returns a DateTime value that represents a specified Year, Month, and Day.

Syntax

 function ibec_EncodeDate(Year, Month, Day: Word): DateTime;

Description

ibec_EncodeDate returns a DateTime value from the values specified as the Year, Month, and Day parameters.

The Year must be between 1 and 9999.

Valid Month values are 1 through 12.

Valid Day values are 1 through 28, 29, 30, or 31, depending on the Month value. For example, the possible Day values for month 2 (February) are 1 through 28 or 1 through 29, depending on whether or not the Year value specifies a leap year.

If the specified values are not within range, ibec_EncodeDate raises an error exception.

Example

  execute ibeblock
  as
  begin
    res = ibec_EncodeDate(2021, 1, 27); 
    if (res is not null) then 
      ibec_ShowMessage(res);
  end

back to top of page
<< ibec_FormatDateTime | IBEBlock | ibec_DecodeDate >>