Here you can find the source of getDBFormat()
private static SimpleDateFormat getDBFormat()
//package com.java2s; import java.text.SimpleDateFormat; public class Main { /**/* ww w.j ava 2 s . c o m*/ * Returns instance of a SimpleDateFormat where the * format has been set to yyyy-MM-dd hh:mm:ss.SSS * * @return a SimpleDateFormat object reference */ private static SimpleDateFormat getDBFormat() { SimpleDateFormat format = new SimpleDateFormat("yyyy'-'MM'-'dd HH:mm:ss.SSS"); format.setLenient(false); return format; } }