Code Sample, a copy-pastable example if possible

pd.to_datetime("06/2015") # When my system date is 5/31/2016, it returns a string (06/2015)

Expected Output

Timestamp('2015-06-01 00:00:00')

output of pd.show_versions()

'0.16.2'

Comment From: jreback

this works on 0.16.2 and master. so not sure what your issue is. you can try a more recent version of pandas.

Comment From: AnnamalaiNagappan

Have you tried changing your system date to 5/31/2016, and tried running the same. It fails for me

Comment From: jorisvandenbossche

@AnnamalaiNagappan Do you mean actually changing the date (why would you want to do that?), or just the style? If so, can you show a reproducible example with setting a locale that fails for you?

Comment From: AnnamalaiNagappan

It's because on that day alone (5/31/2016), the code failed. The immediate next day it seems to working fine.PFA screenshots correct datetime