作者: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
【背景】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
网上时间接口很多,但是源码里根本看不到常规的DateTime类型的时间。全是时间戳形式的时间。这里提供两个接口:http://shijian.duoshitong.com/time.phphttp://www.hko.gov.hk/cgi-bin/gts/time5a.pr?a=1这两个接口返回的全...
sql2008一些简单的操作指令create database class--创建数据库use class--选择要操作的数据库 go /*create table student(code int not null, name varchar(10) ,birthday datetime) alt...
分类:
其他好文 时间:
2014-11-23 15:55:06
阅读次数:
180
如果针对一个类型实例的代码片段经常被用到,我们可能会想到把之封装成帮助方法。如下是一段针对DateTime类型实例的一段代码: class Program { static void Main(string[] args) { DateTime d = new DateTime(2001,5,18)...
分类:
其他好文 时间:
2014-11-22 09:14:12
阅读次数:
145
好久没更新日志了,添加个方法吧,本身没有什么技术可言,为了能方便大家,我稍微整理一下咯~带毫秒的字符转换成时间(DateTime)格式通用方法,如下:(支持格式:2014-10-10 10:10:10,666 或 2014-10-10 10:10:10 666)/// /// 带毫秒的字符转换成时间...
分类:
其他好文 时间:
2014-11-21 18:17:33
阅读次数:
157
int Month = 9; //第一天 DateTime TheFirstDay = Convert.ToDateTime(DateTime.Now.Year + "/" + Month + "/1 00:00:00"); //最后...
分类:
其他好文 时间:
2014-11-20 15:04:31
阅读次数:
153
string responseStr = null; string boundary = "----------------------" + DateTime.Now.Ticks.ToString("x"); byte[] boundarybytes...
分类:
Web程序 时间:
2014-11-19 18:20:15
阅读次数:
206
1.day(date) --参数:date是一个可以解析为 time、date、smalldatetime、datetime、datetime2 或 datetimeoffset 值的表达式、列表达式、用户定义的变量或字符串文字--返回值:一个整数,该整数表示指定的 date 是该月份的哪一天用途....
分类:
数据库 时间:
2014-11-19 18:11:59
阅读次数:
195
如何把datetime类型字段修改为int类型我有一个表为:table1其中有一个datetime类型的字段a 现在我想我想把字段a的类型改为int类型当我执行以下命令时报如下的错误alter table table1 alter column a int null报错:不充许从数据类型datet....
分类:
其他好文 时间:
2014-11-19 17:57:38
阅读次数:
273