Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why what i search is not what i want?

simplex du
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i use java+Oracle.
when i insert my date into my table,i write a serials of SQL as following:
insert into mytable values('10002',to_date('2002-10-12','yyyy-mm-dd'));
when i search this record. the sqlplus env,i can get the exact records. the jsp file . i use java.text.SimpleDateFormat to format the Date like this:
SimpleDateFormat sdfTmp=new SimpleDateFormat("yyyy-MM-dd");
String strTime=sdfTmp.format(rs.getDate("order_date"));
but the strTime is not exactly show as the in the
sqlplus env. why?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic