--步骤:创建日期表,放初始放初始化资料 --因为农历的日,是由天文学家推算出来,到现在只有到年,以后的有了还可以加入! if object_id('SolarData') is not nulldrop table SolarDatagocreate table SolarData ( yearid int not null, data char(7) not null, dataint int not null ) --插入数据 insert into SolarData select
在SQL中取出字符串中数字部分或在SQL中取出字符部分 编写人:CC阿爸 2013-10-18 近来在开发一个项目时,一包含数字的字符串,需要取出中间的数字部分进行排序.经过baidu搜索.并结合自己项目的需求,编写了一个自定义的SQL函数用供项目中使用. /****** Object: UserDefinedFunction [dbo].[F_Get_No] Script Date: 10/18/2013 22:03:13 ******/ SET ANSI_NULLS ON GO SET QU
时间格式转换SimpleDateFormat: //定义日期的格式 SimpleDateFormat format =new SimpleDateFormat("yyMMdd"); //将当前时间转换成上述格式 format.format(Calendar.getInstance().getTime()); y 年 M 月 d 日 h 时 在上午或下午 (1~12) H 时 在一天中 (0~23) m 分 s 秒 S 毫秒 E 星期 D 一年中的第几天 F 一月中