Announcement Announcement Module
Collapse
No announcement yet.
@DateTimeFormat use Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @DateTimeFormat use

    I have created a helper to parse time froma webservice and output inanother format using @DateTimeFormat. However in my jsp view this is not formatted. Am I using this wrong?
    [HTML][HTML]
    @Component
    public class DateParserHelper {

    @DateTimeFormat(style="F-")
    public Date getFormattedDate() {
    return formattedDate;
    }


    public void setFormattedDate(Date formattedDate) {

    this.formattedDate = formattedDate;
    }


    public Date formattedDate;

    public void setDate(String date) throws ParseException {

    DateFormatter dateFormatter = new DateFormatter("y-M-d");
    setFormattedDate( dateFormatter.parse(date, UK));

    }





    }
Working...
X