Here you can find the source of getTimeSecondInteger(Date date)
public static Integer getTimeSecondInteger(Date date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Integer getTimeSecondInteger(Date date) { try {/* ww w . j a va2s . co m*/ SimpleDateFormat formater = new SimpleDateFormat("HHmmss"); return Integer.valueOf(formater.format(date)); } catch (Exception e) { return null; } } }