Code Sample

pd.to_datetime('22/12/2016')

Problem description

This fails on Python 3.6.0, but works with previous versions like 3.5.2. An exception is raised with 3.6:

ValueError: Month out of range in datetime string "22/12/2016"

The error also occurs if dayfirst=True is passed to the function.

Expected Output

2016-12-22 00:00:00

Output of pd.show_versions()

INSTALLED VERSIONS commit: None python: 3.6.0.final.0 python-bits: 64 OS: Linux OS-release: 3.10.0 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.19.1 nose: None pip: 9.0.1 setuptools: 27.2.0 Cython: None numpy: 1.11.2 scipy: None statsmodels: None xarray: None IPython: None sphinx: None patsy: None dateutil: 2.6.0 pytz: 2016.10

Comment From: jorisvandenbossche

Can you update to pandas 0.19.2? This was just released two days ago with some compatibility fixes for python 3.6. In any case, I cannot reproduce this error with py3.6 / pandas 0.19.2

Comment From: jreback

(py36) bash-3.2$ ipython
Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 13:19:00) 
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: pd.__version__
Out[1]: '0.19.2'

In [3]: pd.to_datetime('22/12/2016')
Out[3]: Timestamp('2016-12-22 00:00:00')