Deductions & credits

If I open an HSA account for monies given to me for family coverage that runs October 2017 thru September 2018, can I deduct if from 2017 taxes and use the family coverage maximum?  My kids were still covered under their father's insurance as well thru the end of 2017.