UTguy: The short answer is about two days, maybe three.
The long answer is more complicated only because it explains what happens inside different kinds of paint films as they "dry". Still, it seems to me that if the concern is that the wall trimmer or power stretcher is gonna mark up the walls, I can't see why the installers can't use a piece of sheet metal and some paper towelling to protect the baseboards or walls when they're installing the carpet. But it is true that latex paints do get harder and therefore more scratch and scuff resistant in the first 2 or 3 days after painting. Ditto for oil based paints.
There are basically two kinds of latex paint; ordinary and crosslinking.
1. ORDINARY LATEX PAINTS
Here's how ordinary latex paint forms a film:
Ordinary latex paint is a "slurry" of solid clear, white and coloured particles (called "pigments") and clear hard plastic blobs (called "resins") suspended in a solution of water and a water soluble solvent called a "coalescing agent". When that slurry is spread onto a wall, the first thing that happens is that the water evaporates, and the hard clear plastic resins find themselves surrounded by the coalescing solvent at an ever increasing concentration. As the concentration of coalescing solvent increases, that coalescing solvent "dissolves" (kinda) the hard clear plastic resins, making them very soft and sticky ("mushy", kinda). The forces of surface tension and capillary pressure (which are the same forces that cause rain drops to grow larger in a clowd) act on the soft plastic resins to cause them to pull on each other and that results in them forming a continuous film of plastic with no airspaces between the plastic resins. The clear, white and coloured pigment particles end up suspended in the plastic film very much like raisins in raisin bread. The coalescing solvent then evaporates from the soft paint film resulting in that familiar "newly painted smell" in the room, and as the coalescing solvent evaporates, the plastic hardens back up again to it's original hardness. The plastic in the latex paint won't achieve it's original hardness (that is, as hard as the plastic resins were before painting) for 2 to 3 days after painting as the coalescing solvent gradually evaporates completely from the plastic film.
2. CROSSLINKING LATEX PAINTS
Crosslinking latex paints go one step further. Higher quality latex wall paints will most often be crosslinking, and all latex floor paints will be crosslinking. With crosslinking latex paints, the film formation is exactly the same as with normal latex paints. However, once that first stage of film formation (called "coalescence") is complete, then there will be a second stage of film formation that involves crosslinks forming within and between the plastic resins. Those crosslinks result in the paint film becoming harder, but the second stage of film formation is very slow, and typically takes about a month after painting to be complete. Latex floor paints are typically much harder than latex wall paints, so that second stage of crosslinking does substantially increase the hardness of the latex paint film.
3. "OIL BASED" PAINTS
Oil based paints nowdays use something called "alkyd resins" rather than linseed oil as their binder. Alkyd resins are best thought of as "clumps" of souped up vegetable oil molecules. They are "souped up" by chemically increasing the number of unsaturated sites in those molecules, making them much more highly reactive with the oxygen in the air. It is the oxygen molecules (O2) in the air that react at unsaturated sites to form a pair of C-O-C crosslinks between two unsaturated sites in close proximity, and that's what causes "oil based" paints to transform from a liquid to a solid. It's also what causes glazing putty to dry to a solid since glazing putty is simply a mixture of clay and linseed oil. Boiled linseed oil and tung oil don't have very many of those unsaturated sites in them, so these "drying oils" require chemical dryers to be dry to the touch in 2 or 3 days, and don't approach their ultimate hardness for a full month. By contrast, modern "oil based" paints that use alkyd resins for the binder are dry to the touch in 2 to 3 hours, depending on drying conditions, and will achieve most of their ultimate hardness within 24 hours after painting.
Theoretically, the reaction of unsaturated sites in the natural oil or in alkyd resins with oxygen in the air continues indefinitely, and oil based paint will still theoretically be hardening even when the house is bulldozed 100 years later and the painted drywall or plaster is discarded in a landfill site. But, hardness for oil based paints will typically be quote after a 30 day drying time. For all intents and purposes, almost all of that hardness is achieved within 48 hours to 72 hours after painting, tho.
(ALL "oil based" coatings form films by that process of oxygen reacting at unsaturated sites in the oil molecules (or fragments of oil molecules). Raw linseed oil, boiled linseed oil, Tung oil, oil based paints, polymerized oils like Danish and Swedish oils, real varnish, marine varnish, alkyd paints, alkyd based polyurethanes like floor paints, "varnishes" and hardwood floor finishes are all "oil based" coatings. All of them rely on the chemical reaction of Oxygen molecules from the air at locations where two unsaturated sites in the coating are in close proximity. It's the pair of C-O-C crosslinks that form at those locations that transform the oil from a liquid to a solid.)
You can learn all about latex paints at the Paint Quality Institute's web site at:
Painting information and resources for home interiors and exteriors - Paint Quality Institute
The Paint Quality Institute was established by the Rohm & Haas Company, who are the largest manufacture of the plastic resins used to make latex paints (and acrylic floor finishes, acrylic grout sealers and acrylic nail polish) in North America. Rohm & Haas was purchased by Dow Chemical and is now a subsidiary of Dow.