File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapping Oracle DATE to java.sql.Date ?

 
achana chan
Ranch Hand
Posts: 277
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am getting inconsistent results in the the mapping.
Im the Oracle table, I have a date field which I retrieve using j2sdk1.4 getDate() method. Here is the code snippet from the applet :
[code]
...
import java.util.Date;
...
showHireDate(thisEmpRec.hiredate, HireDate);
...
public void showHireDate(Date hiredate, TextField HireDate)
{ HireDate.setText(hiredate.getDate() + "-" +
hiredate.getMonth() + "-" +
hiredate.getYear());
}
Sometimes, I get the correct display e.g. 21-12-91
Othertimes, I get odd results e.g. 21-7-102
I know it is deprecated, but it should work...
 
achana chan
Ranch Hand
Posts: 277
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wrong forum again, Dirk moves me around so fast I get dizzy.
I tried something new, but get my typical "cannot resolve symbol" error:

javac throws this error
cannot resolve symbol
symbol : method myDateFormat (java.util.Date)
location : class java.text.SimpleDateFormat
return formattedDate.myDateFormat(inputDate);
^

One would think I should get the hang of JAVA after 4 months of JAVA-ing, but, no...
 
achana chan
Ranch Hand
Posts: 277
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I spotted the error, should be

Thanks anyway.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic