推荐学习书目
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
songdg
V2EX  ›  Python

时间转化的问题

  •  
  •   songdg · Sep 21, 2019 · 2914 views
    This topic created in 2445 days ago, the information mentioned may be changed or developed.
    如何将一个具体的 年月日时分秒(例如 2019 年 9 月 21 日 14:27:45 )转化为数值,像 time.time()获取到的数值。
    3 replies    2019-09-22 08:04:41 +08:00
    zjqzxc
        1
    zjqzxc  
       Sep 21, 2019   ❤️ 1
    import time
    time.mktime(time.strptime("2019 年 9 月 21 日 14:27:45","%Y 年%m 月%d 日 %H:%M:%S"))
    zjqzxc
        2
    zjqzxc  
       Sep 21, 2019
    v 站自己给补了一堆空格,需要删除一下
    songdg
        3
    songdg  
    OP
       Sep 22, 2019
    @zjqzxc 谢谢帮助
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1439 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:58 · PVG 07:58 · LAX 16:58 · JFK 19:58
    ♥ Do have faith in what you're doing.