Connection Con = new Connection(); Statement Stmt = Con.createStatement(); ResultSet RS = Stmt.executeQuery('Select CreatedDate from MyTable where month(CreatedDate)=1'); while (RS.next()) { info(RS.getString(1)); }