Here you can find the source of getYear_Second1()
public static String getYear_Second1()
//package com.java2s; import java.sql.Timestamp; import java.text.SimpleDateFormat; public class Main { public static String getYear_Second1() { Timestamp stamp1 = new Timestamp(System.currentTimeMillis()); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String timeStr = sdf.format(stamp1); return timeStr; }/* w w w .j a v a 2 s. c om*/ }