java.sql.Date sql = new java.sql.Date(System.currentTimeMillis()); JOptionPane.showMessageDialog(null,""+sql.toString()); String hoy = sql.toString();