Domicile in Pennsylvania, but moved out of and then back into Virginia

Hello,

I am a domiciliary resident of Pennsylvania who also rented a residence in Virginia. During the same year, I moved out of Virginia at the end of February, but then moved back into Virginia in July. When I moved out in February I had no intent to become a VA resident, but then I took a new job in July and I moved back with intent to stay indefinitely. 

 

Can I file as a part-year resident in VA as long as I include all income I earned during both periods of residency?

 

Also, the Part Year form only gives you one place to put dates for part year residency - either the date you moved in or moved out, but not both.

 

Thank you