Format API dates into 'Y-m-d' format.