From: Angel P. <an...@pc...> - 2004-03-29 16:39:46
|
Sucheta Tripathy wrote: >Hi, > >Thanks. I can't provide sysdate here since I am uploading the release date >of the database. > > > Sorry, I wasn't clear. I mean that you need to provide a date string in the same format as oracle's default format. The easiest way to find out the format is to envoke SYSDATE to view a sample date string. For example: SQL> select SYSDATE from DUAL; SYSDATE ------------------- 2004-03-29 11:32:19 States that I must put a fou digit year first, followed by month followed by month day. Even using the TO_DATE() function, oracle will not make the correct translation with your example: SQL> select to_date('15-DEC-03') from dual; TO_DATE('15-DEC-03' ------------------- 0015-12-03 00:00:00 But If I follow the convention of the default date format, to_date works: SQL> select to_date('2003-DEC-15') from dual; TO_DATE('2003-DEC-1 ------------------- 2003-12-15 00:00:00 In order for your date format to work, you must supply the alternate format to the TO_DATE function: SQL> select to_date('15-DEC-03', 'DD-MON-YY') from dual; TO_DATE('15-DEC-03' ------------------- 2003-12-15 00:00:00 Angel >Probably I have to look into the other options you suggested. > >Sucheta > > > >>This should be controlled by the oracle default date format. do "select >>sysdate from dual;" and you should get the default date format for >>inserting dates in your local oracle installation. Failing that, there >>is a TO_DATE() function in oracle that we may be able to use in the >>object layer for any columsn that have DATE type, but this may not >>translate well to PostgreSQL. >> >>Angel >> >> >>Sucheta Tripathy wrote: >> >> >> >>>Hi, >>> >>>I just found that uploading data into sres.externaldatabaserelease has a >>>problem. >>> >>>The attribute release_date does not get the date format correctly. For >>>example if I provide the date like 15-DEC-03 it shows date like >>>12/3/0015. >>> >>>Is there a fix available for this? >>> >>>Thanks >>> >>>Sucheta >>> >>> >>> >>> >>> >>> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: IBM Linux Tutorials >>Free Linux tutorial presented by Daniel Robbins, President and CEO of >>GenToo technologies. Learn everything from fundamentals to system >>administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >>_______________________________________________ >>Gusdev-gusdev mailing list >>Gus...@li... >>https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >> >> >> > > > > |