Here you can find the source of getTimeStampFormat(Date date)
public static String getTimeStampFormat(Date date)
//package com.java2s; /*/*from ww w .jav a 2 s. c o m*/ * ================================================================== * The Huateng Software License * * Copyright (c) 2008-2012 TOPSCF All rights reserved. * ================================================================== */ import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getTimeStampFormat(Date date) { if (date == null) return null; SimpleDateFormat simpleDateFormat = new SimpleDateFormat( "yyyy-MM-dd-HH.mm.ss.SSSSSS"); return simpleDateFormat.format(date); } }