V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
lcj2class
V2EX  ›  Python

你们能准确分清 strftime strptime 的用法嘛?

  •  
  •   lcj2class · 2017-06-06 11:52:24 +08:00 · 2748 次点击
    这是一个创建于 2510 天前的主题,其中的信息可能已经有所发展或是发生改变。
    用 python 写各种脚本 2 年多了,今天用 datetime 还是傻傻的分不清。。。
    11 条回复    2017-06-07 14:35:18 +08:00
    guyskk
        1
    guyskk  
       2017-06-06 12:00:34 +08:00
    我是这样记的:
    - str_format_time
    - str_parse_time
    knightdf
        2
    knightdf  
       2017-06-06 12:46:30 +08:00
    一个是 format,一个是 parse,很好分啊,s 和 p
    est
        3
    est  
       2017-06-06 13:16:05 +08:00   ❤️ 2
    我主要不是太记得 %Y 什么的。。。。

    知道我发现了 %F %T !!!神器
    GoBeyond
        4
    GoBeyond  
       2017-06-06 13:33:51 +08:00 via Android
    一个文本构造器,一个文本解析器
    alvy
        5
    alvy  
       2017-06-06 13:37:20 +08:00
    我都临时 google 查
    est
        6
    est  
       2017-06-06 14:14:16 +08:00   ❤️ 1
    zeroten
        7
    zeroten  
       2017-06-06 15:07:40 +08:00
    我一直面向 google 编程。。。
    staticor
        8
    staticor  
       2017-06-06 18:49:21 +08:00
    每次用到下意识查 Dash...
    chenqh
        9
    chenqh  
       2017-06-06 18:57:30 +08:00
    我都是用 pychcarm view->Parameter info
    kimchan
        10
    kimchan  
       2017-06-06 19:05:45 +08:00
    @est 我擦. 还有这神器
    romanticbao
        11
    romanticbao  
       2017-06-07 14:35:18 +08:00
    写多了,在需要的时候自然就敲出来啦。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2670 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:36 · PVG 23:36 · LAX 08:36 · JFK 11:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.