0
And when (his son) was old enough to walk with him, (Abraham) said: O my dear son, I have seen in a dream that I must sacrifice thee. So look, what thinkest thou? He said: O my father! Do that which thou art commanded. Allah willing, thou shalt find me of the steadfast. Then, when they had both surrendered (to Allah), and he had flung him down upon his face, We called unto him: O Abraham! Thou hast already fulfilled the vision. Lo! thus do We reward the good. Lo! that verily was a clear test. Quran 37:102-106
Although the Quran doesn't say which of Abraham's sons was neraly sacrificed, Islamic tradition identifies him as Ishmael. This is implied by a verse that follows the story about Abrham's near-sacrifice.
And we gave him tidings of the birth of Isaac. 37:112
So according to the Quran, this near-sacrifice happened before Isaac was born.
For the Bible's version of this story see Genesis 22.