Here you can find the source of getNowDayTimeLong()
public static Long getNowDayTimeLong() throws Exception
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static SimpleDateFormat sdFormatDay = new SimpleDateFormat("yyyy-MM-dd"); public static Long getNowDayTimeLong() throws Exception { String nowDay = sdFormatDay.format(new Date()); return sdFormatDay.parse(nowDay).getTime(); }// w w w . ja va 2s . co m }