Java tutorial
package com.iisi.DAO; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.springframework.batch.item.ItemProcessor; import com.iisi.model.M06a; public class M06aProcessor implements ItemProcessor<M06a, M06a> { @Override public M06a process(M06a m06a) throws Exception { m06a.setLicensePlate(m06a.getDetectionOrigin() + "-" + m06a.getLineNum()); String time = m06a.getDetectionOrigin(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); DateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); Date date = sdf.parse(time); m06a.setYmd(sdf2.format(date)); return m06a; } }