推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
rogwan
V2EX  ›  Python

SQLAlchemy 往 MySQL 里存入日期字符串 '2019/07/01',为什么总是被警告? Warning: (1292, "Truncated incorrect DOUBLE value: '2019/07/01'")

  •  
  •   rogwan · Jul 21, 2019 · 2574 views
    This topic created in 2491 days ago, the information mentioned may be changed or developed.
    date_str = datetime.utcnow().strftime('%Y/%m/%d')
    

    可以存,但是总是被警告:

    Warning: (1292, "Truncated incorrect DOUBLE value: '2019/07/01'") cursor.execute(statement, parameters)

    3 replies    2019-07-21 21:49:07 +08:00
    loading
        1
    loading  
       Jul 21, 2019 via Android
    大家不用回答,楼主自己搜索
    1292, "Truncated incorrect DOUBLE value:
    starsriver
        3
    starsriver  
       Jul 21, 2019 via Android
    看见这个我就想笑了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2852 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 11:40 · PVG 19:40 · LAX 04:40 · JFK 07:40
    ♥ Do have faith in what you're doing.