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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question concerning Oracle 8i and Format Mask command

Re: Question concerning Oracle 8i and Format Mask command

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 23 May 2002 14:58:40 GMT
Message-ID: <3CED0392.C3385FC3@exesolutions.com>


jkutey_at_nospam.nycap.rr.com wrote:

> I have a question concerning Oracle 8i and Format Mask command.
>
> Here is the record in question:
>
> SELECT s_first, s_last
> FROM student
> WHERE s_class = 'FR'
> OR s_dob < TO_DATE('01-JAN-1981', 'DD-MM-YYYY');
>
> Why is it necessary for the 'DD-MM-YYYY' after the date? When I
> origionally inserted the values into the table, I already entered the
> date in the format '01-JAN-1981', 'DD-MM-YYYY. I tried writing the
> query without the DD-MM-YYYY, and it returned the same results.
>
> Thanks
> John

You could easily perform TO_DATE('01-JAN-1981') without the mask if your data is stored in the default format. If it is not then your choice is either to use the default format or to rewrite your TO_DATE in the form the data is stored.

Daniel Morgan Received on Thu May 23 2002 - 09:58:40 CDT

Original text of this message

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