Adjust oven rack to middle position and preheat to 350ºF (175ºC). Grease a 9- by 13-inch baking pan with butter, then dust with all-purpose flour, shaking out excess.
In a medium saucepan, combine dates with water. Bring to a boil over high heat. Remove from heat, add baking soda and salt, and let sit until dates have softened and mixture has slightly cooled, stirring occasionally, about 15 minutes. (The mixture will bubble up—this is fine and normal.)
Using an immersion blender, carefully purée date mixture until smooth. (Alternatively, transfer date mixture to a food processor or blender and blend until smooth.)
In a medium bowl, whisk flour, baking powder, and salt to combine; set aside.
In the bowl of a stand mixer fitted with the paddle attachment, beat butter, sugar, and vanilla on medium-high speed until well combined and fluffy, 2 to 3 minutes, pausing to scrape the bowl and beater as needed with a flexible spatula. (It will be light yellow and won’t be as creamy as when you beat butter for a cake.) Reduce speed to low and add eggs one at a time, letting each fully incorporate before adding the next, scraping down as needed.
Stop mixer and add flour. Mix on low speed until just combined, about 1 minute. Add dates and their liquid and mix on low speed until fully incorporated, 30 seconds to 1 minute, using a flexible spatula to scrape down the sides of the bowl as needed.
Using a flexible spatula, scrape batter into prepared pan and bake until cake has risen, darkened slightly, and a skewer inserted comes out clean, about 1 hour.
Remove from oven and cool on a wire rack until cake is warm to the touch but no longer hot, about 30 minutes.
For the Sauce: About 10 minutes before you plan to serve the cake, in a medium saucepan, melt butter over medium heat. Add sugar and vanilla extract, whisking until smooth and sugar has dissolved, 4 to 6 minutes. Remove from heat and whisk in heavy cream to incorporate. Pour over cake and serve.
