Moving from State A to State B for a new job but finally moved to State C later on.

I know that there is a time requirement to claim moving expenses: "work full-time for at least 39 weeks during the first 12 months immediately following your arrival in the general area of your new job location."

If I move from State A to State B for a new job but I stay only a couple months in the State B and move again to a new State C for another job, can I deduct the move from State A to State B?