Re: forms 5.0 and datetime-field

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 29 Mar 1999 03:53:34 GMT
Message-ID: <7dmtfu$8f9$1_at_nntp.csufresno.edu>


In article <36fe3ede.13450931_at_news.lut.fi>, Tuomas Hosia <hosia_at_lut.fi> wrote:
>I've a datetime-field with formatting DD.MM.RRR HH24.MI and respecting
>date-field in table.
>
>If user writes something to the field, the date is correctly recorded
>to database ( 8.0.4 on NT if it matters). Same thing if I use
>default value $$DATETIME$$.
>
>The problem arises when I try to put something in that field in
>pre-update or pre-insert trigger.
>
>select sysdate into :field from dual;
>
>inserts just date and time-portion is 0. If I try to convert sysdate
>into character string first, I get an error which states that
>date-string is too long.
>
>Confusing, as the format string used in conversion is exactly the same
>as field's format string.
>
>Any ideas?

Do not convert sysdate into a character string first. You should just do: Select sysdate into :Block.Datetime_field from dual;

Do not apply a to_char function to the select. Also, make sure your date item type in Forms is datetime and not date.

Steve Cosner Received on Mon Mar 29 1999 - 05:53:34 CEST

Original text of this message