码迷,mamicode.com
首页 >  
搜索关键字:strftime    ( 605个结果
Python之路【第五篇】:Python基础(20)——模块、序列化、os模块
常用模块 time模块 time.time() time.ctime() time.gtime() time.localtime() time.mktime() time.strftime() time.trptime() time.asctime() datetime模块 datetime.dat ...
分类:编程语言   时间:2016-06-18 01:16:11    阅读次数:175
OpenERP(odoo)开发实例之搜索检索过去3个月的数据
转自:http://www.chinamaker.net/ OpenERP(odoo)开发实例之搜索过滤:检索过去3个月的数据 解决这个问题的重点在于 relativedelta 的应用 示例代码如下: 1: 2: 解释: 第4行: time.strftime('%%d/%%m/%%Y') 返回的是... ...
分类:其他好文   时间:2016-06-11 13:12:07    阅读次数:199
Python日期和时间
输出当前时间 import time#引入time模块 print time.strftime("%Y-%m-%d %H:%M:%S",time.localtime()) 输出日历 import calendar; cal = calendar.month(2016,1); print cal; ...
分类:编程语言   时间:2016-06-09 10:58:57    阅读次数:166
python时间处理详解-乾颐堂
1.获取当前时间的两种方法: import datetime,time now = time.strftime("%Y-%m-%d %H:%M:%S") print now now = datetime.datetime.now() print now 2.获取上个月最后一天的日期(本月的第一天减去 ...
分类:编程语言   时间:2016-06-07 14:47:25    阅读次数:252
python模块 time
获取当前时间>>>importtime >>>print(time.strftime(‘%Y-%m-%d%H:%M:%S‘)) 2016-05-0617:55:20
分类:编程语言   时间:2016-05-07 01:23:04    阅读次数:195
python 时间戳转化
defchange_time(times,status):ifstatus==1:time_stamp_arrary=time.localtime(times)date_time=time.strftime("%Y-%m-%d",time_stamp_arrary)returndate_timeelifstatus==0:time_array=time.strptime(times,"%Y-%m-%d")time_stamp=int(time.mktime(time_array))returntime_stamp
分类:编程语言   时间:2016-04-28 12:30:50    阅读次数:156
SQLite一些函数用法
--case when用法 select case when cast(strftime('%H','now','localtime') as int) >= 6 and cast(strftime('%H','now','localtime') as int) <=12 then '上午' ... ...
分类:数据库   时间:2016-04-27 15:36:07    阅读次数:193
python 中的时间模块time
在Django的学习过程中的时间处理过程中遇到了strftime函数,于是结合《python cookbook》和python docs 对time模块中常用的一些操作和函数做了一点总结和归纳。 time.time() 代表了从特定时间点,也被称作纪元(epoch:[英] [?i:p?k] [美] ...
分类:编程语言   时间:2016-04-27 09:24:41    阅读次数:490
python中FTP上传和下载
python中FTP上传和下载写这篇文章方便以后遇到需要定期去上传或下载时直接可以此简单模板。1.python中FTP上传#/usr/bin/python #-*-coding:utf-8-*- importdatetime importtime importsys importos importftplib defUpload_File(): ftp=ftplib.FTP() TODAY=time.strftime(‘%Y-%..
分类:编程语言   时间:2016-03-26 08:40:53    阅读次数:198
Python之常用模块(一)
time & datatime 模块 random os sys shutil json & picle time & datetime 时间戳(1970年1月1日之后的秒数,即:time.time() 格式化的字符串(如:2016-02-24 14:20 即: time.strftime('%Y-...
分类:编程语言   时间:2016-03-06 17:03:09    阅读次数:343
605条   上一页 1 ... 48 49 50 51 52 ... 61 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!