File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
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"
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Oracle / select sysdate from dual what should return?