File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

How to grab current date???

 
Kishore Dandu
Ranch Hand
Posts: 1934
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have used some calender usage etc(using some ones posting from the web)
Following is my code:
Calendar dateCreated = Calendar.getInstance(new Locale("en","US"));
SimpleDateFormat df = new SimpleDateFormat("yyyy");
// apply the format object to the calendar object.
String formattedDate = df.format(dateCreated.getTime());

But it is giving me bad date.
Can some body suggest some thing easier.
Kishore.
 
Rob Ross
Bartender
Posts: 2205
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Kishore,
you have already posted this exact same question here
Please post your question only one time and in one forum. Many people read multiple forums and it wastes time and space to have to keep track of multiple answers in different threads.
Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic