How far from the end of a 2x12 or 2x10 floor joist can I drill a hole? NEC 502.8 does not give this answer, only that you have to be 2" above or below the edges, not in what part of the span it has to be in.
The rules that I know for holes (not notches) are to keep your hole in the center of the joist when possible (top to bottom) or at least 2" from an edge, round, with a diameter less than 1/3 of height of the joist. Once you follow those, I don't believe there's a restriction on how close or far from the end of the joist you can install the holes. Personally I would keep the hole at least the length of one hole diameter (or 2" for small holes) away from the end of the joist, but there isn't anything in the building code I see requiring that.