If your car has an engine knock, it is important to get it fixed as soon as possible. Engine knock is a knocking or pinging sound that can happen when the air-fuel mixture in the cylinders is detonating in more than once place at a time. This can cause damage to the pistons and cylinder walls.
How long you can drive with engine knock depends on how severe the knocking is. If it is a light knock, you may be able to drive for a while without doing any damage. However, if the knocking is severe, you should have it checked out by a mechanic as soon as possible. Severe engine knock can lead to engine failure if left unchecked.