Mega Code Archive

 
Categories / Java Tutorial / Database
 

Returns a java sql Timestamp equal to the current time

public class Utils {      /**    * Returns a java.sql.Timestamp equal to the current time    **/   public static java.sql.Timestamp now() {       return new java.sql.Timestamp(new java.util.Date().getTime());   } }