Joe rented a truck for one day. There was a base fee of 17.99., and there was an additional charge of 74 cents for each mile driven. Joe had to pay 186.71 when he returned the truck. For how many miles did he drive the truck?

Let's assume Joe drove x miles.

The total cost of the truck rental is the base fee plus the additional charge per mile driven.
Therefore, Joe paid 17.99 + 0.74x = 186.71.
Subtracting 17.99 from both sides gives 0.74x = 168.72.
Dividing both sides by 0.74 gives x = 228.
Joe drove the truck for 228 miles. Answer: \boxed{228}.