GeeCON Prague 2014*
The moose likes JDBC and the fly likes Oracle / select sysdate from dual what should return? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle / select sysdate from dual what should return?" Watch "Oracle / select sysdate from dual what should return?" New topic
Author

Oracle / select sysdate from dual what should return?

D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

I have strange behavior. At every restart of my application



Can print only date like: 2007-07-18
or can print full time stamp, like 2007-07-18 10:23:12
What can be a reason of that? Some internal driver change issued by some other DB operations.

Another question is which timezone the printed value will be? It seems always time zone of database server applied, when java.sql.Date.toString() used. So I need to use SimpleDateFormater with my time zone to get time printed correctly. Is it expeected behavior?


Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
 
GeeCON Prague 2014
 
subject: Oracle / select sysdate from dual what should return?