title: JPA timestamp column and net.sf.json result from query
body: <p>Inside my entity class I have a column of type timestamp:</p>
  
  <pre><code>@Column(name = "TESTD")
  @Temporal(TemporalType.TIMESTAMP)    
  private Date test_date;
  </code></pre>
  
  <p>Inside my session bean I'm creating a select query which return a resultList, and then I'm creating from it a json object:</p>
  
  <pre><code>Query query = em.createNamedQuery("findAllTest");                                               
  List&lt;entityClass&gt; results = query.getResultList();  
  JSONSerializer.toJSON((List)results ,jsonConfig);
  </code></pre>
  
  <p>when creating the json object I want the timestamp column to be formatted (and not to return as object). How can this be done? how can I cast/format the timestamp column according to the date format I want? what is the best way to do this?</p>