Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Storing a "fuzzy date"

Re: Storing a "fuzzy date"

From: Dieter Buecherl <Dieter.Buecherl_at_t-online.de>
Date: Thu, 21 Feb 2002 21:17:07 +0100
Message-ID: <a53kio$luq$07$1@news.t-online.com>


Why don't you truncate the dates that you want to store accordingly?

e.g. trunc(sysdate, 'MONTH') .... which would result in 01 Feb 2002 00:00:00
for all dates in Feb 2002 ....

You could do that when inserting (in a trigger) or when selecting (preferably with using function based indexes if you are on Enterprise Edition)

Would that be fuzzy enough?

"Michael G. Schneider" <mgs_at_mgs-software.de> schrieb im Newsbeitrag news:a533dk$t6$02$1_at_news.t-online.com...
> With Oracle 8.1.7
>
> In my application I would like to support a "fuzzy date". The database
> should not only hold specific dates (as e.g. Feb 20th 2002), but also
> month/year-based dates as "Feb 2002" or just "2002".
>
> Any suggestions on how this might be done, without loosing the
> DATE-functionality too much.
>
> Michael G. Schneider
>
>
Received on Thu Feb 21 2002 - 14:17:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US