Re: D2K Forms and Date Formatting

From: Jan Hansen <jan_at_IHATESPAMbrandsoft.dk>
Date: Mon, 21 Jun 1999 14:28:03 +0200
Message-ID: <Mcqb3.142$hH.351_at_news.get2net.dk>


<7kjp3i$gdv$1_at_lure.pipex.net>...
>Trying to get date/time into a field from system date as
>
> :myblock.myfield := to_char( sysdate, 'DD-MM-YYYY HH24:MI:SS' );
>
> myfield is a database item of type date
>
>The date part is inserted correctly but the current time is lost and get
>00:00:00.
>

The date itemtype has a zero timecomponent (not a bug) You should use datetime.

Besides that you should not convert sysdate to a char before assigning. That forces Forms to make an implicit conversion back to date, using the default format-mask. Try this:

   :MyBlock.MyDateTimeItem := sysdate;

---Jan Hansen

Remove 'IHATESPAM' from the email address. Received on Mon Jun 21 1999 - 14:28:03 CEST

Original text of this message