July 31 (Reuters) - U.S. stocks opened higher on the last day of July, with the Dow hitting a record high, as investors remained optimistic about second-quarter corporate earnings and ahead of economic data.
The Dow Jones Industrial Average rose 37.48 points, or 0.17 percent, to 21,867.79.
The S&P 500 gained 4.29 points, or 0.173537 percent, to 2,476.39.
The Nasdaq Composite added 18.57 points, or 0.29 percent, to 6,393.25. (Reporting by Sruthi Shankar in Bengaluru; Editing by Arun Koyyur)