The last trading day for most of these index contracts (SPX, IWM, RUT, NDX, and others) is the third Thursday of each trading month, one day before stock options expire.
The August contract's last trading opportunity is on the 14th (tomorrow) at 4:30 PM EST, although I don't recommend that you try to trade contracts at the very last second, since you may not get a favourable price. The settlement price is calculated at the open on Friday morning. This means that everyone who holds a contract and does not trade it on the Thursday has some uncertainty about whether they will earn money on the contract or not, and for DITM contracts the question will be how much they will earn.
Why this is that way is a bit mysterious! Practically speaking, it means that even contracts that are a little OTM will trade with a few cents of value right at the last trading instant. This makes for some tricky judgement calls on Thursday afternoon. Generally, I will try to close out positions before the end of the day unless they are way out of the money. As I mentioned in an earlier post above, with the SPX and the NDX, I usually find positions within 20-30 dollars have some risk in them and should be closed. Paying 0.15 to avoid getting smoked is insurance and means a peaceful snooze on Thursday night.