Re: ** H E L P ** Auto inserting date/Time (SQL*FORMS 2.3)

From: Mike Oswald <moswald_at_cwis.unomaha.edu>
Date: Wed, 23 Jun 1993 14:47:34 GMT
Message-ID: <1993Jun23.144734.4202_at_news.unomaha.edu>


cs91dnm_at_brunel.ac.uk writes:
>
> select to_date(to_char(sysdate,'hh24:mi:ss dd-mon-yy'),
> 'hh24:mi:ss dd-mon-yy')
> INTO :time
> FROM dual
>
> where :time is the field on the form (and in the table) that I want the
> date and time stored in. Unfortunately this ALWAYS results in the time part
> being set to 00:00:00
>

On my system (IBM VM platform) to_char(sysdate,'hh24:...') works fine but when I include the to_date(to_char(sysdate,'hh24:...'),'hh24:...') all I get is the date. I tried this at the SQL*Plus level. Are you trying this in FoRMs v3? I called Oracle yesterday to find out why MM/DD/YYYY format mask gives me a date of 0093 instead of 1993. There is a bug ... when the datatype is DATE the date info is stored as MM/DD/1993 but when it is first inserted it is displayed to the user/customer as MM/DD/0093. The datatype of DATETIME saves and displays the date info as MM/DD/0093 (even after re-querying the record).

If under FoRMs v2.x your might want to change the datatype to CHAR and the to_char(sysdate,'hh24:mi:ss dd-mon-yy') should work.

Mike Oswald				TEL: 402-559-4572
Univ. Of NE Medical Center		FAX: 402-559-5579
Computing Services/Telecomm
Omaha NE 68198-5030
USA Received on Wed Jun 23 1993 - 16:47:34 CEST

Original text of this message