How long did David and Bathsheba's first baby live after God made the child sick?

Seven days

And the LORD struck the child that Uriah's wife bare unto David, and it was very sick. ...

And it came to pass on the seventh day, that the child died. 2 Samuel 12:15-18