-
1. Re: Format CSV column with date
cfang Feb 24, 2017 11:55 AM (in response to richardmoore)in your POJO, you can apply different date format to different fields. for ex:
jsr352/StockTrade2.java at master · jberet/jsr352 · GitHub
With that I can have date like:
Date,Time,Open,High,Low,Close,Volume
01/02/1998,09:30,104.44,104.44,104.44,104.44,67040.0
01/02/1998,09:31,104.31,104.44,104.31,104.31,10810.0
01/02/1998,09:32,104.37,104.44,104.31,104.44,13310.0
And the date field can be formated differently, like:
Date,Time,Open,High,Low,Close,Volume
Fri Jan 02 00:00:00 EST 1998,09:30,104.44,104.44,104.44,104.44,67040.0
Fri Jan 02 00:00:00 EST 1998,09:31,104.31,104.44,104.31,104.31,10810.0
Fri Jan 02 00:00:00 EST 1998,09:32,104.37,104.44,104.31,104.44,13310.0
-
2. Re: Format CSV column with date
cfang Feb 24, 2017 12:33 PM (in response to cfang)BTW, if you are using the other JBeret csvItemWriter (the one that's based on super-csv), you can configure cellProcessors batch property for formating each column.