Here you can find the source of getCurrTime()
public static String getCurrTime()
//package com.java2s; //License from project: Apache License import java.util.Date; public class Main { public static String getCurrTime() { Date currdate = getTodayDate(); java.sql.Time tt = new java.sql.Time(currdate.getTime()); return tt.toString(); }//from w w w. j a va 2s.c o m public static Date getTodayDate() { long date = System.currentTimeMillis(); java.sql.Date result = new java.sql.Date(date); return result; } }