2 cups all-purpose flour
1 teaspoon baking powder
1 teaspoon ground cinnamon
1 teaspoon salt
1 1/4 cups unsalted butter, softened
1 cup white sugar
1 (14 ounce) can sweetened condensed milk
1 (12 fluid ounce) can evaporated milk
4 cups fresh corn kernels
Preheat an oven to 350 degrees F (175 degrees C). Grease and flour a 10×15-inch baking pan. Sift the flour, baking powder, cinnamon, and salt together into a bowl. Set aside.
Beat the butter and sugar together with an electric mixer in a large bowl until light and fluffy. Blend the eggs into the mixture one at a time. Stir the condensed milk and evaporated milk into the mixture. Add the flour mixture and mix until just incorporated. Fold the corn kernels into the batter, mixing just enough to evenly combine. Pour the batter into prepared pan.
Bake in the preheated oven until a toothpick inserted into the center comes out clean, about 40 minutes. Cool in the pans for 10 minutes before removing to cool completely on a wire rack.