f



Oracle 10g returns DATE as java.sql.Date?

I noticed that Oracle 10g XE, with the ojdbc14.jar JDBC driver, returns
DATE columns as java.sql.Date valuess. That surprised me, because the
ResultSetMetaData claims the column's Java type is java.sql.Timestamp
-- which would make more sense since DATE columns contain date *and*
time information, just just date.
I seem to remember that Oracle 8i did return java.sql.Timestamp for
DATE columns.
Did they change this, or am I just misremembering? Is there a way to
get the driver to return java.sql.Timestamp?

0
11/9/2005 7:08:50 PM
comp.databases.oracle.server 22978 articles. 1 followers. Post Follow

3 Replies
636 Views

Similar Articles

[PageSpeed] 58


thomas_okken@hotmail.com wrote:

> I noticed that Oracle 10g XE, with the ojdbc14.jar JDBC driver, returns
> DATE columns as java.sql.Date valuess. That surprised me, because the
> ResultSetMetaData claims the column's Java type is java.sql.Timestamp
> -- which would make more sense since DATE columns contain date *and*
> time information, just just date.
> I seem to remember that Oracle 8i did return java.sql.Timestamp for
> DATE columns.
> Did they change this, or am I just misremembering? Is there a way to
> get the driver to return java.sql.Timestamp?

Hi. Oracle made a mistake (in my opinion) in this regard. They made a
new DBMS column type 'TIMESTAMP' which is semantically the same as
DATE, except it has more precision. The driver now maps that column
to a java.sql.TIMESTAMP, but Oracle incorrectly demoted it's map
of the DATE column to a java.sql.Date, which loses data by default
if you do a getObject. This is as if they made a new 'SUPERNUMBER'
column that could hold 50 decimal digits, and then demoted their
NUMBER column map to an integer.
   Enough rant. You can get the previous mapping by adding this
property to your connection:

       prop.put ("oracle.jdbc.V8Compatible", "true");

and you should be safely "back in Kansas". Let me know...

Joe Weinstein at BEA Systems

0
joeNOSPAM (240)
11/9/2005 8:00:28 PM
<thomas_okken@hotmail.com> wrote...

>I noticed that Oracle 10g XE, with the ojdbc14.jar JDBC driver,
> returns DATE columns as java.sql.Date valuess. That surprised
> me, because the ResultSetMetaData claims the column's Java type
> is java.sql.Timestamp -- which would make more sense since DATE
> columns contain date *and* time information, just just date.
> I seem to remember that Oracle 8i did return java.sql.Timestamp for
> DATE columns.
> Did they change this, or am I just misremembering? Is there a way to
> get the driver to return java.sql.Timestamp?

It seems like Oracle in an attempt to make their database more conforming to 
the SQL standards (where DATE actually doesn't contain time info, just the 
date, but instead has the TIMESTAMP datatype), have broken some backward 
compatibilities...

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#08_01


// Bjorn A



0
bjorn_abelli (300)
11/9/2005 8:36:49 PM
Joe Weinstein wrote:
> thomas_okken@hotmail.com wrote:
>
> > I noticed that Oracle 10g XE, with the ojdbc14.jar JDBC driver, returns
> > DATE columns as java.sql.Date values. [...]
>
> [...]
>
>        prop.put ("oracle.jdbc.V8Compatible", "true");
>
> and you should be safely "back in Kansas". Let me know...
>
> Joe Weinstein at BEA Systems

Works like a charm, both by setting it in the system properties and by
setting it in the connection properties. Yay, an Oracle compatibility
problem that's *easy* to work around for a change. :-)

Thanks for the tip,

 - Thomas

0
11/10/2005 1:14:11 AM
Reply:

Similar Artilces:

Oracle Dates and Java Dates and selecting the former into the later
I've been requested to move all of our DATE columns over to timestamps as the Java date object does not have a time element, when a query is thrown to the DB and this selects a date column, the time section is automaticallly lost via JDBC. This sounds like a bag of crock to me, I'm surprised that the easiest option is to needlessly convert an awful lot of columns to timestamps, just so that JDBC can get at the time portion. I'm also concerned that the implication of this is more than it just allowing us to get date / times into Java. What are the storage implications? or are Dates / Timestamps synonymous at an internal level like INTEGERS, FLOATS etc? Thanks, Mike, mike.jones@xenicom.com wrote: > I've been requested to move all of our DATE columns over to timestamps > as the Java date object does not have a time element, when a query is > thrown to the DB and this selects a date column, the time section is > automaticallly lost via > JDBC. > > This sounds like a bag of crock to me, I'm surprised that the easiest > option is to needlessly convert an awful lot of columns to timestamps, > just so that JDBC can get at the time portion. I'm also concerned that > the implication of this is more than it just allowing us to get date / > times into Java. What are the storage implications? or are Dates / > Timestamps synonymous at an internal level like INTEGERS, FLOATS etc? > > Thanks, > > Mike, Hi Mike,...

How to get ORACLE Server Date, not local PC Date?
Hi, I'm trying to get the server date, but sysdate or any date function returns the date of my PC ... is there any way to get this? Alesk "alesk" <find_who@hotmail.com> a �crit dans le message de news: 1152210477.335697.232010@s26g2000cwa.googlegroups.com... | Hi, | | I'm trying to get the server date, but sysdate or any date function | returns the date of my PC ... is there any way to get this? | | Alesk | From doc. <quote> SYSDATE returns the current date and time set for the operating system on which the database resides. </quote> Regards Michel Cadot alesk wrote: > Hi, > > I'm trying to get the server date, but sysdate or any date function > returns the date of my PC ... is there any way to get this? > > Alesk In addition to Michel's reply: SYSTIMESTAMP returns the system date, including fractional seconds and time zone, of the system on which the database resides. The return type is TIMESTAMP WITH TIME ZONE. CURRENT_DATE and CURRENT_TIMESTAMP return DATE and TIMESTAMP WITH TIME ZONE in user's session time zone (set with ALTER SESSION SET TIME_ZONE.) Hth, Vladimir M. Zakharychev N-Networks, makers of Dynamic PSP(tm) http://www.dynamicpsp.com alesk wrote: > I'm trying to get the server date, but sysdate or any date function > returns the date of my PC ... is there any way to get this? ummm is this db by any chance running on your little PC ? meathammer wrote: > al...

Question on Oracle Server 10g Install (.../oracle/oracle/.....
I am in the last stages of installing Oracle Server 10gR2 Enterprise Edition on a UNIX AIX server. When window "Execute Configuration Scripts" comes up it tells me to execute "/u01/app/oracle/oracle/product/10.2.0/db_1/root.sh". The ".../oracle/oracle/..." stops me cold. I look back in my notes and everything I wrote suggests I had entered ".../oracle/product/....." for my ORACLE_HOME. I look at the install log in /u01/app/oracle/oraInventory/logs and see: "INFO: Setting variable 'ORACLE_HOME' to '/u01/app/oracle/oracle/product/10.2.0/d b_1'. Received the value from the command line." Did I really key /oracle/oracle/ instead of /oracle/ or did the OUI change the path for some reason????? Thank you, Bill bfogarty@gaports.com wrote: > I am in the last stages of installing Oracle Server 10gR2 Enterprise > Edition on a UNIX AIX server. When window "Execute Configuration > Scripts" comes up it tells me to execute > "/u01/app/oracle/oracle/product/10.2.0/db_1/root.sh". > > The ".../oracle/oracle/..." stops me cold. I look back in my notes and > everything I wrote suggests I had entered ".../oracle/product/....." > for my ORACLE_HOME. I look at the install log in > /u01/app/oracle/oraInventory/logs and see: > "INFO: Setting variable 'ORACLE_HOME' to > '/u01/app/oracle/oracle/product/10.2.0/d > b_1'. Received the valu...

what are the java codes for Oracle database Date?
I tried to input a date value in a table in oracle database.I found I must type the format in '15-1? -05',then if I use java.sql.Date class,for example,aPrepareStatement.setDate(aSqlDate),coul d it work? if not ,how can i do? thank u. -- augur I think it depends on the default date format set for the individual database instance you are connecting too.... "augur" <asp_augur@hotmail.com> wrote in message news:csb2is$hd0$1@news.yaako.com... >I tried to input a date value in a table in > oracle database.I found > I must type the format in '15-1? -05',then if I > use java.sql.Date class,for > example,aPrepareStatement.setDate(aSqlDate),coul > d it work? > if not ,how can i do? > thank u. > -- > augur > > thank you for replying. it's fortune that I find the JDBC driver does anying for me through reading docs. -- augur ...

it's compatible oracle 8i client, compatible whith oracle 9i server (or oracle 10g server)
Hi all, I have a client/server application that work on the client with oracle 8i client connected to oracle 8i server, Im going to upgrade the server to oracle 9i (or oracle10g) , and I wonder if the client will work fine without upgrade version. Thanks Angel R. wrote: > Hi all, > I have a client/server application that work on the client with oracle 8i > client connected to > oracle 8i server, Im going to upgrade the server to oracle 9i (or oracle10g) > , and > I wonder if the client will work fine without upgrade version. > > Thanks If you have access to the metalink then check the connect matrix at http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=207303.1 Regards /Rauf ...

Cast from java.util.DATE to java.sql.DATE
DB ORACLE Calendar stCal = Calendar.getInstance(); stmt.setDate(COLUMN_DATA, stCal.getTime()); doesn't work because setDate method Sorry for the first post.... DB ORACLE Calendar stCal = Calendar.getInstance(); stmt.setDate(COLUMN_DATA, stCal.getTime()); doesn't work because setDate method (int, java.sql.Date) in the type PreparedStatement is not applicable for the arguments (int, java.util.Date) If I try with: stmt.setDate(COLUMN_DATA, (java.sql.Date)stCal.getTime()); I obtain a class cast exception Any solution? How can I insert a java.util.date obtained from a calendar object in a Oracle DB (java.sql.Date)? thanks in advance Dom On 01.02.2005 12:36 Dom wrote: > > Any solution? How can I insert a java.util.date obtained from a calendar > object in a Oracle DB (java.sql.Date)? > Calendar stCal = Calendar.getInstance(); java.util.Date utlDate = stCal.getTime(); java.sql.Date sqlDate = new java.sql.Date(utlDate.getTime()); stmt.setDate(COLUMN_DATA, sqlDate); Thomas "Thomas Kellerer" <NNGNVRDSJEBN@spammotel.com> schrieb im Newsbeitrag news:3698dfF4v06i6U1@individual.net... > > > On 01.02.2005 12:36 Dom wrote: > > > > Any solution? How can I insert a java.util.date obtained from a calendar > > object in a Oracle DB (java.sql.Date)? > > > > Calendar stCal = Calendar.getInstance(); > java.util.Date utlDate = stCal.getTime()...

Convert java.util.Date to java.sql.Date
I convert java.util.Date to java.sql.Date this way:java.util.Date utilDate = new java.util.Date();java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());And then send sqlDate to prepareStatement.ps.setDate(1, sqlDate).But I got the date such as dd-mm-yyyy. And I need also take hours,minutes pm(am).How can I get the Date "dd-mm-yyyy hh:mm a"? Bumsys@gmail.com wrote: > I convert java.util.Date to java.sql.Date this way: > > java.util.Date utilDate = new java.util.Date(); > java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime()); > > And then send sqlDate to prepareStatement. > ps.setDate(1, sqlDate). > But I got the date such as dd-mm-yyyy. And I need also take hours, > minutes pm(am). > > How can I get the Date "dd-mm-yyyy hh:mm a"? The Java Date holds its data as milliseconds since epoch - you have the hours, minutes and seconds down to the millisecond in there already. If you are asking how to *display* the Date down to the second, then consider using things like <http://java.sun.com/javase/6/docs/api/java/text/DateFormat.html> or <http://java.sun.com/javase/6/docs/api/java/util/Calendar.html> If you're asking how to get the database to *store* the date to a certain resolution, that depends on how you define the column in which you store the data, which in turn depends on the SQL dialect your DBMS uses. Check the docs for your DBMS, and if necessary redefine the column to hold the...

Converting java.util.Date to java.sql.Date
Hello Friends In my program i am using the following codes: Date today = new Date(); log.debug("today is"+today); SimpleDateFormat fmt = new SimpleDateFormat("yyyy-mm-dd"); String todayStr = fmt.format(today); log.debug("todayStr value"+todayStr); java.sql.Date dt = java.sql.Date.valueOf(new String(todayStr)); log.debug("current Dt is:"+dt); The output iam getting is like this: today is Sat Sep 09 19:20:13 IST 2006(from java.util.Date) todayStr value 2006-20-09(from string value) current Dt is: 2007-08-09(from java.sql.Date) So h...

Re: Trying to compare todays date to the contents of a date field in an oracle database.
Hi Dave, Wouldn't it be better, for reasons of security, to make your username and password unrecognizable? I did that in the quoted part below. Regards - Jim. On Mon, 19 Jul 2004 12:07:47 -0700, David Fickbohm <DavidF@HOMEGAIN.COM> wrote: >People, >I am working in SAS v8.1, in a windows environment. Oracle 8i. > >I am trying to determine whether the contents of a field called >d_membership_expire_ts (Timestamp) is less than the current date. Currently >I get a message saying I have an invaled relational operator. > >Any and All help will be greately appre...

Re: Trying to compare todays date to the contents of a date field in an oracle database.
I think you can just compare a timestamp directly to SYSDATE in this SQL passthrough. The () after SYSDATE() in your original are not part of Oracle syntax. PROC SQL; connect to oracle(user='megan' pass='mzdm2xt' path='reporting2'); create table agents as select * FROM USER_OWN.T_AGENT A1, USER_OWN.T_USER A2, USER_OWN.T_MEMBERSHIP A3 where D_MEMBERSHIP_EXPIRE_TS < SYSDATE AS.... ; quit; ...

Date for Oracle Database 10g for Solaris 10 (x86)
I was wondering about this and found a few messages that said March 05, but nothing official. Does anyone have a date or a link to an actual announcement (other than last fall when Sun/Oracle simply announced it would be supported). In article <n7iWd.93852$tl3.79413@attbi_s02>, Scott <nospam@mailinator.com> wrote: >I was wondering about this and found a few messages that said March 05, but >nothing official. Does anyone have a date or a link to an actual >announcement (other than last fall when Sun/Oracle simply announced it would >be supported). Under Solaris platform certification, Metalink reports March for 10g R2 for Solaris 10 x86. It also states that support for 64-bit Solaris x64 will come with 10g R3 Not yet read when release 3 of 10g will ship. John groenveld@acm.org "John D Groenveld" <groenvel@cse.psu.edu> wrote in message news:d0d2gv$p9f$1@neuromancer.cse.psu.edu... > In article <n7iWd.93852$tl3.79413@attbi_s02>, > Scott <nospam@mailinator.com> wrote: >>I was wondering about this and found a few messages that said March 05, >>but >>nothing official. Does anyone have a date or a link to an actual >>announcement (other than last fall when Sun/Oracle simply announced it >>would >>be supported). > > Under Solaris platform certification, Metalink reports March for 10g R2 > for > Solaris 10 x86. > > It also states that support for 64-bit...

from sql server to oracle to ANOTHER oracle
I have a linked server to a oracle db, that works. I have to write a query from sql server that connecto to the oracle server, and the use a database link from that oracle db to another oracle db. I'm not able to find the syntax. I try to write something like SELECT * FROM LINKTOORACLE..mm510TAL.CSHDET@ORAGATE2 but it does not work questions 1) is is possible to use nested dblinks ? 2) if so, how ? thank you! On Nov 10, 10:57=A0am, Alberto Marchi <alberto.rol...@gmail.com> wrote: > I have a linked server to a oracle db, that works. > > I have to write a query from sql server that connecto to the oracle > server, and the use a database link from that oracle db to another > oracle db. I'm not able to find the syntax. > > I try to write something like > > =A0SELECT * FROM > =A0 LINKTOORACLE..mm510TAL.CSHDET@ORAGATE2 > > but it does not work > > questions > 1) is is possible to use nested dblinks ? > 2) if so, how ? > > thank you! use a synonym that points to the second linked table? On Nov 10, 9:27=A0pm, onedbguru <onedbg...@yahoo.com> wrote: > On Nov 10, 10:57=A0am, Alberto Marchi <alberto.rol...@gmail.com> wrote: > > > > > > > I have a linked server to a oracle db, that works. > > > I have to write a query from sql server that connecto to the oracle > > server, and the use a database link from that oracle db to another > > oracle db. I&#...

Oracle(r) Database 10g Release 2 Outperforms Microsoft SQL Server 2005 in Head-to-Head Comparison
Third Party Study Proves Oracle Database Can Deliver Substantial Savings Over Microsoft SQL Server 2005 Read Full Detail at http://technology-post.com/tech/?p=516 ...

How to convert Oracle native Date to date time
I get numbers like 1178002042 instead of date time info when I run access againt oracle. Does anyone know what the math is to convert this to date time, I assume it is telling me the number of seconds past some arbirtrary point in time like midnight 1-1-1980 ? Does anyone know what this arbitrary point in time is, if so I can work with the date time info as delivered via my current connection and applications. Thanks On May 3, 7:55 am, tracy <usatr...@hotmail.com> wrote: > I get numbers like 1178002042 instead of date time info when I run > access againt oracle. > > Does anyone know what the math is to convert this to date time, I > assume it is telling me the number of seconds past some arbirtrary > point in time like midnight 1-1-1980 ? > > Does anyone know what this arbitrary point in time is, if so I can > work with the date time info as delivered via my current connection > and applications. > > Thanks Show us the query returnng this value; we can't tell you what is happening if you don't tell us exactly what you're doing. David Fitzjarrell On May 3, 8:55 am, tracy <usatr...@hotmail.com> wrote: > I get numbers like 1178002042 instead of date time info when I run > access againt oracle. > > Does anyone know what the math is to convert this to date time, I > assume it is telling me the number of seconds past some arbirtrary > point in time like midnight 1-1-1980 ? > > Does anyone ...

Re: Changing ORACLE date to SAS date
NEW_OPEN_DT = datepart(OPEN_DT); By the way, this actually changes 1430870400 to 16561. To demonstrate, run: data _null_; OPEN_DT = '5may2005 00:00:00'dt; NEW_OPEN_DT = datepart(OPEN_DT); format open_dt datetime. new_open_dt date9.; put _all_; put (open_dt new_open_dt)(=best12.); run; You should see: OPEN_DT=05MAY05:00:00:00 NEW_OPEN_DT=05MAY2005 _ERROR_=0 _N_=1 OPEN_DT=1430870400 NEW_OPEN_DT=16561 On Tue, 17 May 2005 17:17:08 -0400, Abul Azad <abul.azad@COMMERCEBANK.COM> wrote: >I wrote the following code to change "5/5/2000" to &qu...

reading dates from sql server 2008 as dates
Hi, I have a table in sql server 2008 with dates in the form yyyy-mm-dd, but when loaded into sas they appeared as type:text. Any idea why? Thanks! ...

How to write shell script to export oracle 8.1.6 database to import oracle 10g database
Hi, I am trying to write or understand the conj process for export the data from oracle 8i to oracle 10g database. I have constraint that the previous loaded data into oracle10g should not be deleted or replace by newly imported database. Regards Nikhil ...

Oracle 10g Release Date?
Anyone know the actual release date of oracle 10g now?? Raj raj wrote: > Anyone know the actual release date of oracle 10g now?? > > Raj Not even Larry I suspect. But weeks not months. -- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan@x.washington.edu (replace 'x' with a 'u' to reply) There have been repeated posts to otn.oracle.com General Database news group with no answer from Oracle. There was one recent request to join the beta which was more or less responded to favorably. "raj" <rajesh_choprauk@yahoo.co.uk> wrote in message news:80c4d335.0401290815.5d3d1bf0@posting.google.com... > Anyone know the actual release date of oracle 10g now?? > > Raj Tom Hester wrote: > There have been repeated posts to otn.oracle.com General Database news group > with no answer from Oracle. There was one recent request to join the beta > which was more or less responded to favorably. > > "raj" <rajesh_choprauk@yahoo.co.uk> wrote in message > news:80c4d335.0401290815.5d3d1bf0@posting.google.com... > >>Anyone know the actual release date of oracle 10g now?? >> >>Raj Betas are ongoing. When 10.0 is done ... 10.1, 11.0, and 12.0 are in progress. 10g will be released when the last one or two show-stopper bugs are fixed: Not before ... but very soon. -- Daniel ...

Oracle SQL query by date
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time = '01-SEP-02' I'm getting no results. The date_and_time field is formatted like this: 2002-SEP-02 00:01:04 When I run a range, the results show that records do occur on the single date that I am looking for: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time >= '01-SEP-02' and date_and_time <= '01-DEC-02' I'm wondering whether the problem may have something to do with the date field containing both the date and time. Any suggestions? Thanks. "vnl" <vnl999@vnl999.invalid> wrote in message news:Xns9535C4FA974ABvnl999@216.196.97.131... > I'm trying to run a SQL query but can't find any records when trying to > select a certain date. Here's the sql: > > SELECT field 1, field2, date_and_time, > FROM table1 > WHERE date_and_time = '01-SEP-02' > > I'm getting no results. The date_and_time field is formatted like this: > > 2002-SEP-02 00:01:04 > > When I run a range, the results show that records do occur on the single > date that I am looking for: > > SELECT field 1, field2, date_and_time, > FROM table1 > WHERE date_and_time >= '01-SEP-02' and date_and_time <= '01-DEC-02' > > I'm wondering whether the p...

problem with date in oracle 10g
Hi to everybody and sorry for my english i have a problem with a query in a comparison of date it seems that oracle fails in comparring two date in a function this is the function: CREATE OR REPLACE FUNCTION whr_DtMin ( DATA1 DATE, DATA2 DATE ) RETURN DATE DETERMINISTIC AS BEGIN IF (DATA1 IS NULL AND DATA2 IS NULL) THEN RETURN NULL; END IF; IF (DATA2 IS NULL OR DATA1 < DATA2) THEN RETURN DATA1; ELSE RETURN DATA2; END IF; END; it must return the minimum date between the two received as parameters sometimes the functions don't work and return the wrong date i use it in a query like this: select field,field ,whr_dtMax(a.dtiniz,c.dtinmeCo) dtiniz ,whr_dtMin(a.dtfine,c.dtfimeCo) dtfine ,field,field from tablea a join tablec c etc... can anybody help me? tia roberto nenni Roberto Nenni wrote: > i use it in a query like this: > select field,field > ,whr_dtMax(a.dtiniz,c.dtinmeCo) dtiniz > ,whr_dtMin(a.dtfine,c.dtfimeCo) dtfine > ,field,field > from tablea a > join tablec c etc... > > can anybody help me? It might be caused by some implicit data type conversion. Please post the result of "desc <tablename>" for the tables involved. And an actual example of the query when its result is incorrect. On Dec 18, 1:30 pm, "Roberto Nenni" <rnen...@xeim.it> wrote: > Hi to everybody and sorry for my english > > i have a problem with a query in a comparison of date > it seem...

Oracle SQL Date Calculations?
Hi, just like to have some quick command reference. By the following command: select to_date('20051231','YYYYMMDD') - to_date('20051101','YYYYMMDD') from dual; we can get the difference between the two dates are 60 days. By using add_months() we can get the month from given difference. Are there more such quick tools? I would need the following: Given a date for the day during a given week, output the start and end date(s) of that week; How about given day in a month? Year? Feburary's last day, or leap year or not? .... Thanks. "RK" <rekaben@yahoo.com> wrote in message news:1137177221.693407.71900@g43g2000cwa.googlegroups.com... > Hi, just like to have some quick command reference. > > By the following command: > > select to_date('20051231','YYYYMMDD') - to_date('20051101','YYYYMMDD') > from dual; > > we can get the difference between the two dates are 60 days. > > By using add_months() we can get the month from given difference. > > Are there more such quick tools? I would need the following: > > Given a date for the day during a given week, output the start and end > date(s) of that week; > > How about given day in a month? Year? > > Feburary's last day, or leap year or not? > > > ... > > > Thanks. > same place you'll find to_date and ...

java.sql.Date value truncated using JDBC in MS-SQL Server
Hi, I'm trying to write a java.sql.Date to a database and the minutes/ seconds etc. are not being written. I've seen and tested many examples found via searches and still have come up with nothing. Here's what I have: java.sql.Date formation - recommended constructor forms: java.sql.Date entryDttm = new java.sql.Date(System.currentTimeMillis()); OR java.sql.Date entryDttm = new java.sql.Date(new java.util.Date().getTime()); // prepared statement insert pstmt.setDate(1, entryDttm); // what is written to database 2007-02-07 12:00:00.000 // what needs to be written 2007-02-08 09:37:25.793 The above date value is written when I insert using the SQL method GETDATE() in a straight SQL Insert statement. The field is stored in a MS SQL Server 8.0 database and is defined as a 'datatime' or 'smalldatetime' field. How can I replicate the results of GETDATE() into 'datetime' and 'smalldatetime' fields in a MS-SQL Server database (or is it possible?). Would a timestamp datatype make more sense? I'm using MS_SQL Server JDBC drivers. Any advice would be GREATLY appreciated! ddog wrote: > Hi, > I'm trying to write a java.sql.Date to a database and the minutes/ > seconds etc. are not being written. I've seen and tested many examples You multi-posted this one to comp.lang.java.programmer as "Re: java.sql.Date truncated when written to DB. How to obtain full date?". F...

Get the date time from Oracle date time stamp?????
I am using crystal reports to attempt to extract information from this database but I need to know which records were last updated. I have managed to find a field in Oracle and its value is based on a trigger function as shown below begin select TIMESTAMP_SEQ.nextval into :new.NURS_TIMESTAMP from dual; end; This at 9.45am (UK) on 05/09/2003 generated a value of 5,048,868 My main expertise is in SQL Server, my question is can I reverse engineer this value to calculate the time? Or is it like an identity field in SQL server (i.e. An automatic incremental counter) I would really appreciate any help or pointers to some good web sources. Ric wrote: > I am using crystal reports to attempt to extract information from this > database but I need to know which records were last updated. I have > managed to find a field in Oracle and its value is based on a trigger > function as shown below > > begin > > select TIMESTAMP_SEQ.nextval into :new.NURS_TIMESTAMP from dual; > > end; > > This at 9.45am (UK) on 05/09/2003 generated a value of 5,048,868 > > My main expertise is in SQL Server, my question is can I reverse > engineer this value to calculate the time? Or is it like an identity > field in SQL server (i.e. An automatic incremental counter) > > I would really appreciate any help or pointers to some good web > sources. Oracle dates are always WITH time! The ...

How do I check which Oracle Patches are appplied to an Oracle DataBase Server
I would like to know if someone could help me with this topic, I'm traying to analize and chek which Oracle Patches are appplied to an Oracle DataBase Server >chek which Oracle Patches are appplied to an Oracle DataBase Server If they were applied with oPatch, then "opatch lsinventory" should show you what's there. If you did not use oPatch, then I have no clue. ;-) BD wrote: > >chek which Oracle Patches are appplied to an Oracle DataBase Server > > If they were applied with oPatch, then "opatch lsinventory" should show > you what's there. > > If you did not use oPatch, then I have no clue. ;-) For better or worse ( we know the answer ) opatch is the tool that install patches from oracle support. "If you did not use oPatch" ... what? >"If you did not use oPatch" ... what? In my 8i environments, there are separate scripts that are run - for example, for a cpu, it would be 'install_cpu.sh'. In those cases, I really don't know how (if) one can confirm which patches have been applied to an environment. ...

Web resources about - Oracle 10g returns DATE as java.sql.Date? - comp.databases.oracle.server

Desert Strike: Return to the Gulf - Wikipedia, the free encyclopedia
The game was later released on several other formats, including a much upgraded version for the Amiga home computer. The game was inspired by ...

Brisbane man deported to Chile still holds out hope for a return home
An Australian-raised father deported to live alone in Chile late last year has been reunited with his partner and two youngest children, at least ...

EU, Ankara agree to terms for return of migrants to Turkey
EU leaders conclude a controversial deal with Turkey intended to halt migration flows in return for financial and political rewards.

Apple issues $3.5B three-part bond in return to US market
Apple this week issued a $3.5 billion, U.S. dollar-denominated bond to pay for its capital return program, outstanding debt, acquisitions and ...

Hedge fund closures return to highs
More hedge funds folded in 2015 than at any time since the financial crisis, dragged down by turbulent markets, the FT reports

UVa routs Hampton 81-45 after Bennett collapses, returns
RALEIGH, N.C. (AP) — Virginia sure got a scare in its NCAA Tournament opener.

Missouri Republican pressed to return $1 million after donor faces $40 million sex abuse lawsuit
... with the law or the tabloids, and when the story breaks, the opponents of whomever that guy gave money to call on the recipient to return the ...

Edward Holcroft To Return To Matthew Vaughn’s ‘Kingsman 2’
EXCLUSIVE – Up-and-coming Brit actor Edward Holcroft is returning to Matthew Vaughn ’s Kingsman 2 . Holcroft, whose character was thought to ...

Sonic Boom returns this September
Sonic Boom: Fire & Ice will launch on September 27, Sega announced today at South by Southwest. The Nintendo 3DS exclusive was initially supposed ...

Kerry: Freed Gitmo Prisoner Was 'Not Supposed To' Return to Al Qaeda
... Secretary of State John Kerry had no answer on Wednesday for how a former terrorist detainee at Guantanamo Bay, Cuba, was able to return to ...

Resources last updated: 3/20/2016 3:30:43 AM