How to explain formation of dative bond in CH3NO2 molecule?

For ${H}_{3} C N {O}_{2}$, we have $3 \times 1 \left(H\right) + 4 \left(C\right) + 5 \left(N\right) + 2 \times 6 \left(O\right) = 24$ $\text{valence electrons}$ to distribute over 7 centres.
A Lewis representation of ${H}_{3} C - \stackrel{+}{N} \left(= O\right) \left(- {O}^{-}\right)$ is standard, and this distributes the 12 electron pairs. Because there are 6 electrons formally associated with nitrogen (4 from the bonds, and 2 inner core), this centre is said to be $\text{quaternized}$, and thus bears a formal positive charge (7 electrons are associated with the neutral nitrogen atom). The anionic oxygen is associated with 9 electrons (2 inner core) instead of the eight of neutral oxygen, and so bears a formal negative charge. Of course, we can distribute this negative charge to the other oxygen by resonance.