Can I claim mileage rate for one vehicle and then section 179 deduction for a second vehicle that same year?

I have used my personal vehicle first half of this year for work travel. Now I want to transition to keep my personal car for personal use and purchase another vehicle this year for 100% business use. Can I claim standard mileage rate for the personal vehicle use for first half of the year and also the standard 179 deduction for the new vehicle for second half in the same year?