I need to get the date (in particular the year) from the database to integrate it into Java
String now = "SELECT DATE_FORMAT(NOW( ), '%Y' )";
try {
java.sql.Statement sp=cn.createStatement();
ResultSet RS = sp.executeQuery(now);
while(RS.next()){
ahora = RS.getInt("Now");
System.out.println(ahora);
}
however the "Now" does not recognize it inside the table ... (since it does not exist) how can I get that data to implement it to the variable "now"