Date today = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); String name = "bosse"; int before = jdbcTemplate.queryForInt("select count(*) from PERSON where NAME='bosse' and BIRTH_DATE='"+ formatter.format(today) + "'"); jdbcTemplate.execute("update PERSON set BIRTH_DATE='" + formatter.format(today) + "' where NAME=" + name);