2012-06-27

Python时间格式化时间戳毫秒

Views: 59673 | Add Comments

格式化当前时间:

import datetime
datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')

精确到毫秒:

datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')

当前时间戳:

import time
time.time()

Related posts:

  1. 将LevelDB数据导入SSDB
  2. SSDB 的 C++ 客户端接口
  3. Python logging 标准配置
  4. 使用Python POST任意的HTTP数据以及使用Cookie
  5. 使用ServletContextListener在服务器启动和关闭时创建和关闭缓存
Posted by ideawu at 2012-06-27 16:42:57

Leave a Comment