Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
tmccauley
5 Post subject: Format dates with date and time in SQL result  PostPosted: Oct 20, 2005 - 06:21 PM
Registered Member
Registered Member


Joined: Mar 07, 2005
Posts: 7

I am looking for a way in the SQL results to display/format a data to have date and time like a time stamp instead of just the date :( . Is there a way to do that in the Database Explorer.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 21, 2005 - 05:32 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Does your column support that level of granularity? Are you sure you didn't just select a type that only stored the date (and note a timestamp)

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
tmccauley
Post subject:   PostPosted: Oct 24, 2005 - 03:30 AM
Registered Member
Registered Member


Joined: Mar 07, 2005
Posts: 7

The data is in an Oracle database of type date. But I insert it as Timestamp and is stored as Timestamp. But when I try to look at it in the database explorer it only shows the date and not date and time.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 24, 2005 - 02:46 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

It looks like you need to use TO_CHAR if you wish to see more granularity: http://www-db.stanford.edu/~ullman/fcdb/oracle/or-time.html

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
tmccauley
Post subject:   PostPosted: Oct 24, 2005 - 05:27 PM
Registered Member
Registered Member


Joined: Mar 07, 2005
Posts: 7

I am sorry. I can display the time in my code and I know how to use the TO_CAHR. What I would like to be able to do is display the date and time in the DB Browsers - Table Info - Preview tab. There the date or timestamp is displayed as a date only. I would like to be able to change the date colum in the preview tab to display date and time and not date only. Sorry for the confusion and thanks for your time. By the way I viewed the say data in Squirrel-sql and it will display date time.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 24, 2005 - 06:28 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

This may be a problem, because right now the information displayed in the preview is just doing a straight select, per that link above it looks like to be able to view more granulated information from the DATE column type, you need to use TO_CHAR and specify a formatting string, in the case of the DB explorer, that level of customization is not supported.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
chihangli
Post subject:   PostPosted: Dec 19, 2005 - 11:33 PM
Veteran Member
Veteran Member


Joined: Dec 19, 2003
Posts: 16

hi ,

I am running into this problem as well but I beleive its more like a JDBC driver issue. Basically the newer Oracle driver actually truncate the time portion of the Date when retrieving from DB while it stores ok.

Ref : http://forums.oracle.com/forums/thread.jspa?threadID=155494&tstart=0&messageID=1018387

The question would be, is there a way to set these properties when DBExplorer opens the connection? I tried putting those setting in both eclipse.ini and config.ini but still doesn't work. Any other options???


Joseph
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Dec 20, 2005 - 07:31 AM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2339

Joseph,

Thank you for pointing us to that thread - I was able to both replicate and fix the issue by changing my eclipse shortcut like so:
c:\eclipse\eclipse.exe -vmargs -Doracle.jdbc.V8Compatible=true

Please note the -vmargs switch - that sends all succeeding arguments to the VM, not eclipse. If you wish to modify your eclipse.ini file instead of the shortcut, use the following line in the file.
-vmargs -Doracle.jdbc.V8Compatible=true

Let us know how it turns out,
Best,
Brian.

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-michael
Post subject:   PostPosted: Jan 21, 2006 - 01:12 PM
Moderator
Moderator


Joined: May 05, 2003
Posts: 1037

We discovered a bug that was causing Oracle 9i to drop the time element in date information. This bug has been fixed and will be available the upcoming ME 4.1 GA release.

_________________
Michael
MyEclipse Support

Posting Guidelines FYI
When posting a bug report, click the "Insert" button above the message window and fill out the empty fields to help us troubleshoot your problem.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits