Fix date formatting to work with NumPy 1.7