Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question about format masks.
Wim,
I wanted to allow users to enter either 211099 or 21-OCT-1999. I
accomplished it by assuming if the str len was 6, it was the former
format. I converted it to date, then back to a string. Ultimately, I
inserted my string into the db with a to_date as Dave shows.
IF LENGTH(:SEARCH.BEFORE_DATE) = 6 THEN
:SEARCH.BEFORE_DATE := TO_CHAR(TO_DATE (:SEARCH.BEFORE_DATE,
'DDMMYY'),'DD-MON-YYYY');
ELSE
:SEARCH.BEFORE_DATE := TO_CHAR( TO_DATE (LTRIM(RTRIM (:SEARCH.BEFORE_DATE)), 'DD-MON-YYYY'), 'DD-MON-YYYY');END IF;
In article <7un191$10f$1_at_toto.tig.com.au>,
"Dave Waterworth" <pscdaw_at_ihug.com.au> wrote:
> INSERT to_date('21101999','ddmmyyyy') INTO table
> SELECT to_char(date_column,'dd/mm/yyyy') FROM table
>
> Is that what you mean?
>
> Wim Valgaeren <valgaeren_at_softhome.net> wrote in message
> news:7umh9f$dqn$1_at_naxos.belnet.be...
> > How can I insert a date as ddmmrrrr and show it as dd/mm/rrrr in
forms 5.0
> ?
> >
> > If you know this, please let me know.
> > Thanks.
> >
> > Wim Valgaeren
> >
> >
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Oct 21 1999 - 17:04:42 CDT