摘要: /// <summary> /// 转换时间为时间戳秒 /// </summary> /// <param name="date">需要注意时区误差</param> /// <returns></returns> public static double ToTimeSpan(DateTime date) { return Math.Truncate(date.Subtract(new DateT 阅读全文
posted @ 2019-08-16 15:51 农村手艺人 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1.sqlserver 日期转时间戳,取到秒,十位 select DATEDIFF(s,'1970-01-01 00:00:00',getdate()) 2.sqlserver 时间戳转日期 select DATEADD(S,1528380035,'1970-01-01 00:00:00') 3.mysql日期转时间戳,取到秒,十位 select UNIX_TIMESTAMP(now()) 4.m 阅读全文
posted @ 2019-08-16 14:49 农村手艺人 阅读(823) 评论(0) 推荐(0) 编辑
摘要: Truncate Table sbank show status like 'qcache%'; show variables like '%query_cache%'; set @@global.query_cache_size=1024*1024*64; mongodb.find 常用的条件设置语句: 1.简单查询: db.user.find({name:'11111',age;20}... 阅读全文
posted @ 2019-08-14 15:08 农村手艺人 阅读(221) 评论(0) 推荐(0) 编辑
摘要: C# 数据类型 映射到SQL Server的数据类型 int int string nvarchar(Max) decimal decimal(18,2) float real byte[] varbinary(Max) datetime datetime bool bit byte tinyint 阅读全文
posted @ 2019-08-14 14:57 农村手艺人 阅读(296) 评论(0) 推荐(0) 编辑