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 -> Oracle to_date() function and ANSI SQL 99

Oracle to_date() function and ANSI SQL 99

From: Neil Zanella <nzanella_at_cs.mun.ca>
Date: 3 Apr 2002 17:02:29 -0800
Message-ID: <b68d2f19.0204031702.408c5734@posting.google.com>


"Jim Kennedy" <kennedy-family_at_attbi.com> wrote in message:

> A better way is to use to_date and not rely on the client side
> nls_date_format setting.
> eg
> insert into t values(to_date('2001-12-13','yyyy-mm-dd'));
>
> or on the client specify the nls_date_format you want instead of the default
> (which you can change on the server in the init.ora file; you have noticed
> that the default for the default is as you say, but it is configurable).
>
> Relying on a specific string format for a date without specify the format is
> asking for trouble. Why? A client machine could change the nls_date_format
> setting on you and that would mess up your data.

Interestingly enough the to_date() function you mention is available not only on Oracle but also in PostgreSQL. However MySQL does not implement it. Is the to_date() function by any means part of the more recent ANSI SQL 99 standards? That is, can I expect to find it on other ANSI SQL conformant database such as Informix, DB2, etc... or is it an Oracle specific function which just happens to be supported by PostgreSQL by chance?

Thanks,

Neil Received on Wed Apr 03 2002 - 19:02:29 CST

Original text of this message

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