Most units lose about 2 points of attck when they switch to swords in normal formation. What you see on the unit description is when they're in phalanx. That means a normal, unupgraded Hoplite unit only has an attack of I think 5 with his sword. Obviously, in some cases you'll suddenly find your kill rate dropping like a stone.

Spartans are of course an exception. Their attack remains the same regardless of formation, because they're double hard bastards.