How do I configure the date format independently for each of my date fields?
For example, let's say I have a CustomerOrder class with more than 1 java.util.Date fields in it.
I need to be able to render like this:


So one of the dates may not care about the hh:mm:ss.
i.e. I cannot format every date the same way.
Any ideas?

This is my technology stack:

- Tomcat 7
- Jersey 1.16
- Enunciate 1.26.2
- Spring 3.1.2
- Hibernate 4.1.7
- JPA 2.0.3
4 Years
Discussion Span
Last Post by BrackishWater

I see no problems there...

  1. Get hold of date
  2. Use SimpleDateFormat to create order date
  3. Use second SimpleDateFormat to create estimated shipment date

Can you explain where are you having dificulties???


Jersey is doing everything for me. So I can't "get hold of date". I have a method that returns an object and Jersey serializes it to XML or JSON for me. I'm guessing that the only solution is to write a custom serializer, but I really don't want to have to do that. That's a huge part of why I'm using a framework.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.