DateTime today = dt.Date;//今天 00:00:00DateTime tomorrow = dt.Date.AddDays(1);//明天 00:00:00DateTime startWeek = dt.AddDays(1 - Convert.ToInt32(dt.DayOf...
Debug.Log(DateTime.Now); Debug.Log(DateTime.Now.AddDays(1)); DateTime dt = new DateTime(DateTime.Now.Year , DateTime.Now.Month, ...
分类:
其他好文 时间:
2014-11-25 18:11:12
阅读次数:
187
作者:木尘 日期:2014-11-25
插件实现插入带时间功能的说明:
1. 创建插件:
Tools → New Plugin:
import datetime
import sublime_plugin
class AddCurrentTimeCommand(sublime_plugin.TextCommand):
def run(self, edit):...
分类:
其他好文 时间:
2014-11-25 16:27:27
阅读次数:
428
标准 DateTime 格式字符串MSDN标准DateTime格式字符串包含一个标准DateTime格式说明符字符,该字符表示自定义 DateTime 格式字符串。格式字符串最终定义由格式化操作产生的DateTime对象的文本表示形式。请注意,任何包含一个以上字母字符(包括空白)的DateTime格...
分类:
其他好文 时间:
2014-11-25 14:13:36
阅读次数:
191
最近开始使用Django开发一些系统,在models.py中设置一些数据库表结构并给日期时间字段赋初值,不过在使用的过程中,遇到一点问题。问题是,我本来服务器使用的市区是“Asia/Shanghai”(+08:00),然后用datetime.now保存到数据库中时,里面的时间总是比我的系统时间相差8...
分类:
数据库 时间:
2014-11-25 12:38:50
阅读次数:
556
use LOL gocreate table zuoye(code int primary key identity(1,1),name varchar(20),class char(3),sex char(2),teacher varchar(20),birth datetime ,height ...
分类:
其他好文 时间:
2014-11-25 10:40:48
阅读次数:
291
作者:zhanhailiang 日期:2014-11-25
想在代码注释时插入当前时间发现Sublime Text 2不支持,于是编写插件实现插入时间功能:
1. 创建插件:
Tools → New Plugin:
import datetime
import sublime_plugin
class AddCurrentTimeCommand(sublime_plugin.T...
分类:
其他好文 时间:
2014-11-25 00:19:27
阅读次数:
199
编程语言对文件系统的操作是一项必不可少的功能,各种编程语言基本上都有对文件系统的操作,最简洁的莫过于linux里面shell的操作了,其次,则是python,ruby等动态语言的操作,那么,今天先来看下,在python里面如何使用一些常用的操作文件功能。...
分类:
编程语言 时间:
2014-11-24 22:31:23
阅读次数:
303
【背景】5.6.4以后时间类型(TIME,DATETIME,TIMESTAMP)支持微秒DATETIME范围 :'1000-01-01 00:00:00.000000'to'9999-12-31 23:59:59.999999'TIMESTAMP范围:values is'1970-01-01 00:...
分类:
数据库 时间:
2014-11-24 22:08:43
阅读次数:
345
Python3.0和以前版本的区别
(1)print 。3.1版本之后要用括号括起来(print("abs"),类似于java)而2.0版本不用。
(2)input代替了2.0版本的raw_input;
(3)3.0版本没有file函数了,要打开文件要用open;f = open(shoplistfile,'wb');
(4)没有了Cpickle模块了,使用pickle模块;
(5)使用pickle.dump()方法时,打开文件的读操作要是“wb”,使用load方法时...
分类:
编程语言 时间:
2014-11-24 20:52:57
阅读次数:
266