Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SimpleDateFormat Problem  RSS feed

 
Kassi Hill
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to format a string using the SimpleDateFormat method and it is not working. I was hoping that someone more experienced could point out my problem. Thank you.

private String assignDate;

public void setAssignDate(String aDate){
try{
SimpleDateFormat fdate = new SimpleDateFormat("MM-DD-YY");
assignDate = fdate.format(aDate);
}catch (Exception e){}
}
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consult the SimpleDateFormat API, and see what is the difference between m and M, d and D, y and Y, etc.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!