Problems with Date Field

From: Scott Haley <haleysco_at_pilot.msu.edu>
Date: Wed, 17 Nov 1999 10:44:36 -0500
Message-ID: <3832CD64.CA5E7089_at_pilot.msu.edu>



[Quoted] [Quoted] I'm working in Forms 5.0 and I'm having a problem with a data field. [Quoted] The way the system is set up the users enter the each part of the date (month, day, year) into separate textboxes. The text boxes have the autoskip property set to yes, this is the way the users wanted it. On the post text event of the year field I concatenate these together in the DD-MON-YYYY format and then try and stuff them into the event_date text box. But I keep getting an error (ORA-01830), I put my code below [Quoted] which constructs the correct date format from the three fields. Any help would be greatly appreciated.

DECLARE

  V_MONTHNUM NUMBER(2);
  V_MONTHTXT CHAR(3);
  V_DAY NUMBER(2);
  V_YEAR NUMBER(4);
  V_DATE VARCHAR2(11);

BEGIN

  V_MONTHNUM := :REQUEST_LINEITEMS.TXTMONTH;
  V_DAY := :REQUEST_LINEITEMS.TXTDAY;
  V_YEAR := :REQUEST_LINEITEMS.TXTYEAR;

  V_MONTHTXT := REMIT_PROC.MONTH_TEXT(V_MONTHNUM);   V_DATE := V_DAY || '-' || V_MONTHTXT || '-' || V_YEAR;   :REQUEST_LINEITEMS.EVENT_DATE := TO_DATE(RTRIM(LTRIM(V_DATE))); EXCEPTION
  WHEN OTHERS THEN
    MESSAGE (ERROR_TEXT); END; Thanks in advance,
Scott Received on Wed Nov 17 1999 - 16:44:36 CET

Original text of this message