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

converting Date to String

 
Ian Cockcroft
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am converting a Date to a String to place in a textField.
How do I do this?
My code so far:
 
Mahesh Mamani
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ian Cockcroft:


Hello,
U try this
String stringOrderDate = dateOrderDate.toString();
Hope this helps...

Mahesh
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the idea:
String stringOrderDate = dateOrderDate.toString();
or

Making sense?
 
Ian Cockcroft
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
100%, thanks guys.
but dont get comfortable, it wont be long before I got some more stuppid questions.
cheers
Ian
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you want to format it a certain way (not just the toString() default pattern you can use a SimpleDateFormat:

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