We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
import pandas as pd import sqlite3 today = pd.to_datetime("2023/9/5") ele = [1, 2, 3] df = pd.DataFrame({'date': [today] * len(ele), 'data': ele}) df.set_index('date', inplace=True) conn = sqlite3.connect('date.db') df.to_sql('test_date', conn, if_exists='replace') conn.close()
the date in db becoming like this : 1693843200
the same code was working properly in 2.0.3, the date was correctly identified into YYYY-mm-dd.
I understand it's suggested to use utc=True, but please don't just make db broken instantly, that hurts.
it would be appreciated if devs could take a look.
It should be identified as YYYY-mm-dd, in this case, 2023-09-05 00:00:00, when using .to_sql() saving in db.
The text was updated successfully, but these errors were encountered:
Thanks for the report. Duplicate of #54877
Sorry, something went wrong.
Thanks for the report. This will be fixed in 2.1.1
No branches or pull requests
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
Issue Description
the date in db becoming like this : 1693843200
the same code was working properly in 2.0.3, the date was correctly identified into YYYY-mm-dd.
I understand it's suggested to use utc=True, but please don't just make db broken instantly, that hurts.
it would be appreciated if devs could take a look.
Expected Behavior
It should be identified as YYYY-mm-dd, in this case, 2023-09-05 00:00:00, when using .to_sql() saving in db.
Installed Versions
The text was updated successfully, but these errors were encountered: