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

Column type

 
Elahe Shafie
Ranch Hand
Posts: 291
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I have a date column and it's type is Date. Do I need to have "SimpleDateFormat" in my program to format my date as well or not?
Thanks,
Elahe
 
Corey McGlone
Ranch Hand
Posts: 3271
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That really depends on what you want to do with that Date object. The Date class has a toString() method which displays the date it contains, but you can't modify how this date if formatted using only the Date class. If you want to format it to a specific user's taste or to some general format of your own, you'll have to use the SimpleDateFormat class. However, if you don't need to display it in any special way, you won't need that class.
Corey
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic