title: How to format output date in Itemwriter?
body: <p>I've a domain class as follows</p>
  
  <pre><code>class SubScritpion{
  
   private String subScripId;
   private String useId;
   private  Date subScripDate;
   private Date billStartDate;
   private Date billEndDate;
   private  int amount;
  
   //getters and Setters
  }
  </code></pre>
  
  <p>And I'm reading this data from database with data type as timestamp in database and converting it to java.util.Date  and writing to csv file using <code>flatefileItemwriter</code>, my ItemWriter is as follows.</p>
  
  <pre><code>&lt;bean id="kpCvsFileItemWriter" class="org.springframework.batch.item.file.FlatFileItemWriter"
          scope="step"&gt;
          &lt;!-- write to this csv file --&gt;
          &lt;property name="resource" value="file:/#{jobParameters['abs.file.path']}" /&gt;
          &lt;property name="shouldDeleteIfExists" value="true" /&gt;
  
          &lt;property name="lineAggregator"&gt;
              &lt;bean
                  class="org.springframework.batch.item.file.transform.DelimitedLineAggregator"&gt;
                  &lt;property name="delimiter" value="," /&gt;
  
                  &lt;property name="fieldExtractor"&gt;
                      &lt;bean
                          class="org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor"&gt;
                          &lt;property name="names"
                              value="subScripId,useId,subScripDate,billStartDate,billEndDate,amount" /&gt;
                      &lt;/bean&gt;
                  &lt;/property&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
  
          &lt;property name="headerCallback" ref="kpFileHeader" /&gt;
  
      &lt;/bean&gt;
  </code></pre>
  
  <p>Now the problem is the date format my database has the date format <code>17-NOV-14 04.25.06.806000000 AM</code> but the csv file contains the date format <code>Mon Nov 17 04:25:06 UTC 2014</code>. </p>
  
  <p>I did not find any formmatter which can be pluged into ItemWriter though I find some reference for  ItemReader. </p>
  
  <p>One way is to fix this issue by introducing ItemProcesser and convert the the date format to String with SimpleDateFormatter and write to new field in the domain ojbect with and then refer this new fields instead of the Date filed in itemWriter.
  <p> But I would like to have cleaner solution something similar to <code>CustomEditor</code> that can be applied value-type in spring xml. Could somebody point out some resource in this regard or direction</p>