Okay that was pure nitro . The original question asked if a stick of dynamite would explode if hit with a bullet.
So dynamite and TNT are two different things, but information about TNT tends to be confused with dynamite. Original dynamite was 40%-60% nitroglycerine, combined with diatomaceous earth. What this did was to drastically reduce the chance that the nitro would explode while handling. Reduce..., but not eliminate...
BUT..., original dynamite (invented in 1866) has about a 1 year shelf life. It must be kept cool (which is why you see movies where folks boil it to extract the nitro) and it must be rotated often to keep the nitro from seeping out of the sticks due to gravity. Even when properly handled, a slug from a Winchester could very well set the stuff off.
Now out West, the stuff probably took a while to arrive at a frontier destination, and then if it was stored too long, even with proper handling, its level of stability would degrade. Eventually, original dynamite would be difficult to prevent it from going off by accident.
TNT is used by the US Military and not dynamite, because it's more stable than dynamite, and does need a good initiator to set it off.
LD