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: Date format and Oracle

Re: Date format and Oracle

From: David Pattinson <david_at_addease.com.au>
Date: Thu, 03 Jun 1999 16:42:05 +1000
Message-ID: <375623BC.CD3DF294@addease.com.au>


Actually, you could write your own to_date() function in the other DBMS's. That way you can always call it in your code, no matter which one you're using.

David.

Kinna Patel wrote:

> The TO_DATE function would only work if I was using an Oracle
> database, therefore I have decided to us the standard syntax which
> would work on any databases.
>
> My question now is how would I extract data from the database using
> filtering on dates ie give me all the records where Date1 > 1 Jun 1999
>
> On Tue, 1 Jun 1999 15:18:46 +0200, "J. Wegener NOSPAM" <xjw_at_xdde.xdk>
> wrote:
>
> >Use either the standard syntax:
> >update R_List set Date1 = '01-JUN-99'
> >
> >or apply a format mask:
> >update R_List set Date1 = to_date('6/1/99', 'MM/DD/YY')
> >
> >See you SQL reference for details
> >
> >Cheers
> >Johan
> >
> >Kinna Patel skrev i meddelelsen <3753ca7c.12325469_at_news.demon.co.uk>...
> >>Does anyone know what the SQL is to insert a field of date format into
> >>an Oracle database.
> >>
> >>At the moment I am using
> >>
> >>Update R_List set Date1 = '6/1/99'
> >>
> >>which is suppose to insert a date of 1 June 99 into my table.
> >>
> >>However, I get an error 'not a valid month' when my database is
> >>Oracle. However, this SQL works when the database is say SQL.
> >>
> >>I need some SQL whcih will work whatever database I am using.
> >>
> >>I hope some in this newsgroup will be able to help.
> >
> >
Received on Thu Jun 03 1999 - 01:42:05 CDT

Original text of this message

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