package huolongluo.family.util; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * Created by 火龙裸 on 2018/7/13. */ public class Number_Of_Days { /** * 获取当月的 天数 */ public static int getCurrentMonthDay() { Calend
var myDate = new Date(); //获取本月第一天周几 var monthFirst = new Date(myDate.getFullYear(), parseInt(myDate.getMonth()), 1).getDay(); //获取本月天数(获取后一个月的0日即前一月的最后一日) var totalDay=(new Date(myDate.getFullYear(), parseInt(myDate.getMonth() + 1), 0)).getDate();
转自:http://blog.itpub.net/14766526/viewspace-1156100/ select GETDATE() as '当前日期',DateName(year,GetDate()) as '年',DateName(month,GetDate()) as '月',DateName(day,GetDate()) as '日',DateName(dw,GetDate()) as '星期',DateName(week,GetDate()) as '周数',DateName(h
/** * java获取 当月所有的日期集合 * @return */public static List<Date> getDayListOfMonth() { List list = new ArrayList(); Calendar aCalendar = Calendar.getInstance(Locale.CHINA); int year = aCalendar.get(Calendar.YEAR);//年份 int month = aCalendar.get(Calendar.M
SqlServer获取所有数据库,表,表结构 --获取所有数据库 SELECT * FROM Master..SysDatabases ORDER BY Name --获取test数据库下所有表 use test SELECT name FROM SysObjects Where XType='U' ORDER BY Name --获取test数据库下所有表结构信息 use test then d.name else null end) 表名, a.colorder 字段序号,a.name 字段