Here you can find the source of iso(Date date)
yyyy-MM-dd HH:mm:ss
pattern.
public static String iso(Date date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/*from www .j a v a 2 s .c o m*/ * Formats the specified date using <code>yyyy-MM-dd HH:mm:ss</code> * pattern. */ public static String iso(Date date) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date); } }