Declare @Begindate Date; set @Begindate = getdate()Select cast(Convert(varchar(10),cast(@Begindate as date),112) as int) As Datekey, Year(@Begindate)....
分类:
数据库 时间:
2014-09-04 18:54:49
阅读次数:
239
近期项目用到了很多日期转换为字符串、字符串转换为日期的方法,而且也用到了很多日期格式,特整理如下,以备后用。1、日期转换为字符串、日期格式使用函数CONVERT:CONVERT(data_type[(length)],expression[,style])参数expression是任何有效的Micr...
分类:
数据库 时间:
2014-09-04 16:47:19
阅读次数:
309
select*from 表 WHERE1=1andconvert(varchar(100),SC001_APPLYTIME,23)>='2014-08-27'andconvert(varchar(100),SC001_APPLYTIME,23)<='2014-08-28' convert(varc....
分类:
其他好文 时间:
2014-09-03 16:14:06
阅读次数:
247
Sqlserver中经常
要操作一些时间类型的字段转换,我又不太记得住,所以搜集了以下的一些SqlserverConvertDateTime相关的资料发表在自己的小站里,方便自己以后要用的时候寻找,望对大家也有帮助.
将sqlserver中table表的[datetime]字段值‘2007-11-0716:41:35.033’ 改为‘2007-11-0700:00:00‘去除了时分秒.[d...
分类:
其他好文 时间:
2014-09-03 14:57:36
阅读次数:
274
/*
Write a program that prints the numbers from 1 to 100,but for multiples of three print “Fizz” instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of...
分类:
其他好文 时间:
2014-09-03 11:19:16
阅读次数:
221
1 function replace_unicode_escape_sequence($match) { 2 return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); 3 } 4 $name = '\u65b0\u....
分类:
Web程序 时间:
2014-09-03 11:03:36
阅读次数:
230
Imagemagick常用指令(ImageMagick--蓝天白云)(ImageMagick官网)(其他比较有价值的IM参考)convert 转换图像格式和大小,模糊,裁剪,驱除污点,抖动,临近,图片上画图片,加入新图片,生成缩略图等。identify 描述一个或较多图像文件的格式和特性。compo...
分类:
其他好文 时间:
2014-09-02 14:02:14
阅读次数:
272
原文: DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决: DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决: DateTime.ParseExact(this...
分类:
其他好文 时间:
2014-09-02 03:45:34
阅读次数:
167
{ attributeSumValue= beforEntity.Sum(e => Convert.ToDecimal( e.GetType().GetProperties().Where(o => o.Name == attributeName).Single().GetValue(e, nul....
分类:
其他好文 时间:
2014-09-01 19:18:13
阅读次数:
190
C# 中对 Session 的“(string)”、“.ToString()”与“Convert.ToString”用法笔记在实际操作当中,我们经常会遇到将 Session 的值转为 String 去判断是否为空或者判断是否有权限访问某页,这里的转换过程如果用得不恰当会抛出异常,给访问者带来不好的用...
分类:
其他好文 时间:
2014-09-01 15:30:23
阅读次数:
152