37,719
社区成员
发帖
与我相关
我的任务
分享
C:\>python
Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> t=time.strftime("%Y%m%d%H%M%S",time.localtime())
>>> print t
20110221123122
import time;
a = "Fri Aug 13 14:05:20 2010";
a = time.strptime(a, "%a %b %d %H:%M:%S %Y");
a = time.strftime("%Y%m%d%H%M%S", a);
print(a);