Re: Date presented as VARCHAR2 in forms6

From: MarkyG <markg_at_mymail.tm>
Date: Sat, 21 Jul 2001 21:56:26 GMT
Message-ID: <ab87195e.0106210155.1e8dfcf7_at_posting.google.com>


Sergey,

[Quoted] Sorry you inherited a weird design ;-(
Anyway....

  1. If users are viewing this field in Forms, you can have a 'hidden' base table field of format YYYYMMDD and a non-base table field in which the YYYYMMDD date is converted into the normal DD-MON_YYYY. User updates the DD-MON-YYYY field into what they want and then you need a piece of code to update the hidden base table field converting the new DD-MON-YYYY into YYYYMMDD. (Makes Sense?)
  2. If user wants to see that in SQL*Plus, have you considered adding a field to each table in the DD-MON-YYYY format and having a trigger to update it every time the other field changes?
  3. Consider using views with an additional DD-MON-YYYY field.

Either way, its a maintenance nightmare! First idea sounds easiest.

M

"SeredinaMy" <srayzberg_at_hotmail.com> wrote in message news:<T65Y6.3464$8P6.640205_at_typhoon1.gnilink.net>...
> Thanks, Mark and Daniel,
>
> I totally agree with you, but unfortunately, it's not in my power to change
> it. The rationale for YYYYMMDD was to make it easily orderable by the other
> programs and validation routines, plus, in all the (15+) tables all the
> columns(hundreds) are made VARCHAR2. I have inherited this design :o((
>
> Thanks for your help.
>
> Sergey
> MarkyG <markg_at_mymail.tm> wrote in message
> news:ab87195e.0106200048.54e1bea4_at_posting.google.com...
> > I agree with Daniel.
> > Storing dates as 'Date' is no problem, you can easily use a format
> > mask of YYYYMMDD for display purposes.
> >
> > Mark
> >
> > "Daniel A. Morgan" <dmorgan_at_exesolutions.com> wrote in message
 news:<3B303ECC.74081AB2_at_exesolutions.com>...
> > > SeredinaMy wrote:
> > >
> > > > Hi guys,
> > > >
[Quoted] > > > > I have a table where date stored in YYYYMMDD as VARCHAR2. This goes
 to the
[Quoted] > > > > form into VARCHAR2 field. Users would like to see it in DD-MON-YYYY as
 a
[Quoted] > > > > date, update it if needed and save back as ...VARCHAR2 again in
 YYYYMMDD.
> > > >
> > > > Please, tell me, what is the easiest way to achieve this?
> > > >
> > > > Appreciate your time and help.
> > > >
> > > > Sergey
> > >
> > > Change the field in the table to a date field. If you don't it will
 drive you
> > > crazy forever and you will have a miserable time doing date math.
> > >
> > > Daniel A. Morgan
Received on Sat Jul 21 2001 - 23:56:26 CEST

Original text of this message