Develop > Programming > System Language reference > List: rtecalls > rtecall("datemake") function

rtecall("datemake") function

A RAD function that returns a date, in the proper form, based upon a series of numbers passed to it.

Function

rtecall("datemake")

Format

$L.success.flg=rtecall($L.fnc.name, $L.return.code, $L.date, $L.yr, $L.mo, $L.da, $L.hr, $L.mn, $L.se)

Parameters

The following parameters are valid for the rtecall("datemake") function:

Parameter Data type Description
$L.success.flg Logical Indicates if the function was successful.
$L.fnc.name String The name of the sub-function to call, in this case "datemake".
$L.return.code Number Provides a more detailed return code.
$L.date Date/Time The variable in which the date will be returned.
$L.yr Number The year. A 2-digit year uses the prefix 20 for years up to 50, and 19 for years after. For example, 48 returns 2048, 99 returns 1999.
$L.mo Number The month.
$L.da Number The day. Valid values are from one (1) through 31.
$L.hr Number The hour.
$L.mn Number The minutes.
$L.se Number The seconds.

Factors

The $L.success.flag and $L.return.code always return true, even when the function is unsuccessful.

Examples

$L.cal.date=‘01/01/05 00:00:00’
$L.success.flg=rtecall("datemake",$L.return.code, $L.cal.date, 0, 5, 31, 17, 15, 22)

Results:

  • $L.success.flag=true
  • $L.cal.date=‘05/31/2005 17:15:22’
$L.cal.date=‘01/01/05 00:00:00’
$L.success.flag= rtecall("datemake",$L.return.code, $L.cal.date, 0, 2, 31, 17, 15,
22)

Note that 2/31/05 is an invalid date.

Results:

  • $L.success.flag=true
  • $L.cal.date=‘01/01/2005 00:00:00’

The result is invalid; therefore the date variable is unchanged. Regardless of the success or failure, the $L.success.flag returns a value of true.