OraIntToDate Function

Action

Converts a date from integer format (YYYYMMDD) to an Oracle internal date. This function may be used to generate an Oracle internal date, which can then be bound using Oracle's SQLT_DAT data type.

Include file

Ora.bdh

Syntax

OraIntToDate( in  nDate    : number,
              out sOraDate : string );
Parameter Description
nDate Date in integer format (YYYYMMDD)
sOraDate Variable receiving the Oracle internal date

Example

var
  cCursor: cursor;

dcltrans
  transaction TMain
  var
    sOraDate: string;
  begin
    ...
    OraBind(cCursor, ":colDATE", SQLT_DAT);
    OraIntToDate(19980924, sOraDate);
    OraSetBinary(cCursor, ":colDATE", sOraDate, 7);
  end TMain;