Results 1 to 3 of 3
- 07-28-2010, 01:03 PM #1
Member
- Join Date
- Jul 2010
- Posts
- 2
- Rep Power
- 0
To_date function through Java shows timestamp
Hi All,
When i give the select query from toad, SELECT TO_DATE (TO_CHAR (SYSDATE, 'MM/DD/YYYY'), 'MM/DD/YYYY')
FROM DUAL
, gives me as the date with proper date format. But when i go through my java program, i am getting with timestamp.
Actually, my desired output is the date column that i need to show in mm/dd/yyyy format as well as i want it as to_date, so that it will sort by using the date. If, i use the to_char, then it is sorting in character.
Can some one help in solving this:)
- 07-28-2010, 01:40 PM #2
Can you post the java code that you go thru to show the date?
The SimpleDateFormat class allows you to format it many different ways
- 07-29-2010, 08:59 AM #3
Member
- Join Date
- Jul 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Reading timestamp value from Oracle database using Java Spring
By sm123 in forum New To JavaReplies: 3Last Post: 07-22-2010, 12:28 PM -
how to compare two timestamp
By baktha.thalapathy in forum New To JavaReplies: 1Last Post: 06-11-2010, 10:05 AM -
Send object via web service, with a java.sql.Timestamp attribute
By diegofsza in forum Enterprise JavaBeans (EJB)Replies: 0Last Post: 08-15-2009, 11:40 PM -
java.sql.Date incompatible with java.sql.Timestamp
By nn12 in forum New To JavaReplies: 2Last Post: 12-08-2008, 03:42 PM -
Timestamp in SQL format
By Java Tip in forum Java TipReplies: 0Last Post: 02-10-2008, 11:37 AM


LinkBack URL
About LinkBacks

Bookmarks