Here you can find the source of formatValue(Object value)
public static String formatValue(Object value)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static SimpleDateFormat formatStoring = new SimpleDateFormat( "dd.MM.yyyy HH:mm:ss"); public static String formatValue(Object value) { if (value == null) { return "\"NULL\""; }// w w w .j a va 2 s. c om if (value instanceof Date) { Date date = (Date) value; return "\"" + formatStoring.format(date) + "\""; } else { return "\"" + value + "\""; } } }