BUG: %p not working in pd.to_datetime #46038
Labels
Closing Candidate
May be closeable, needs more eyeballs
datetime.date
stdlib datetime.date support
Datetime
Datetime data dtype
Needs Triage
Issue that has not been reviewed by a pandas team member
Usage Question
Uh oh!
There was an error while loading. Please reload this page.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
returns
but should return
Issue Description
%p
format string is ignored, when using to_datetime.It is a valid format string according to https://strftime.org/ and the pandas docs and doesn't raise an error.Expected Behavior
The format is either parsed correctly or an error is returned that %p is not supported.
Installed Versions
INSTALLED VERSIONS
commit : 06d2301
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-99-generic
Version : #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.1
numpy : 1.20.3
pytz : 2021.3
dateutil : 2.8.2
pip : 22.0.3
setuptools : 50.3.2
Cython : 0.29.26
pytest : 6.2.2
hypothesis : 6.8.1
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.7.1
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.30.1
pandas_datareader: None
bs4 : 4.10.0
bottleneck : None
fastparquet : None
fsspec : 2021.11.1
gcsfs : None
matplotlib : 3.5.0
numba : 0.54.1
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 4.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : None
tables : None
tabulate : 0.8.7
xarray : 0.19.0
xlrd : 2.0.1
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: