Re: Need help with DATE and Forms 5.0

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: Wed, 29 Sep 1999 02:44:15 GMT
Message-ID: <32fI3.57$dB1.5657_at_nntp.csufresno.edu>


What is wrong with:

declare
  val date;
begin
  val := :MYBLOCK.TIME_STAMP;
end;

Unless you are doing some odd generic programming -- like something in a PLL library, then you never need to use Name_In.

Steve Cosner
http://members.aol.com/stevec5088

> val := to_date ( name_in ( 'MYBLOCK.TIME_STAMP' ), 'MM/DD/YYYY
>HH24:MI:SS' );

In article <ocLwN2my0fGSXKN0=sbinj=x=B7L_at_4ax.com>, Jim West <Jim.West_at_mci.com> wrote:
>Ok, I'm stumped on this one.
>
>Details:
>
> Oracle 8.0.4 running on Solaris 2.6.
> init.ora has NLS_DATE_FORMAT as MM/DD/YYYY HH24:MI:SS
>
> Oracle Forms 5.0 (Developer/2000 R2.1)
> Windoze98 Registry has NLS_DATE_FORMAT as MM/DD/YYYY HH24:MI:SS
>
> I have a table with a field of type DATE.
>
> In a PL/SQL library program unit I have a statement:
>
> val varchar2(20);
>
> val := name_in ( 'MYBLOCK.TIME_STAMP' );
>
>This returns the date/time as:
>
> DD-MMM-YYYY
>
>note there is no time.
>
>So...I try the following:
>
> val date;
>
> val := to_date ( name_in ( 'MYBLOCK.TIME_STAMP' ), 'MM/DD/YYYY
>HH24:MI:SS' );
>
>I get the error ORA-06502 "PL/SQL: numeric or value error"
>
>...so I try modifying the above call to:
>
> val := to_date ( name_in ( 'MYBLOCK.TIME_STAMP' ) );
>
>...and I get the same error.
>
>Would some kind soul point me in the right direciton. I need to get
>the value in MM/DD/YYYY HH24:MI:SS format.
>
>I do have this format mask on the form field and the date/time does
>indeed display correctly on the form. I'm just not able to get that
>format with the built_in name_in function.
>
>Much thanx!
>
>
Received on Wed Sep 29 1999 - 04:44:15 CEST

Original text of this message