今天項目中要獲取本周、本月、本季、本年的第一天,發現網上的方法或多或少都有問題,於是自己寫了一個,親測可用。 同時回顧了一下js日期對象的知識,做個總結 先上代碼: getYear()返回年份與1900 年之間的差,如1994年返回94,而2009年則會顯示109 ...
今天項目中要獲取本周、本月、本季、本年的第一天,發現網上的方法或多或少都有問題,於是自己寫了一個,親測可用。 同時回顧了一下js日期對象的知識,做個總結 先上代碼: getYear()返回年份與1900 年之間的差,如1994年返回94,而2009年則會顯示109 ...
Oracle 獲取本周、本月、本季、本年的第一天和最后一天 --本周 select trunc(sysdate, 'd') + 1 from dual; select trunc(sysdate, 'd') + 7 from dual; --本月 select trunc(sysdate ...
JAVA獲取本周 本月 本年 第一天和最后一天 ...
參數聲明 1、查詢本日開始、結束時間 2、查詢本周開始、結束時間 3、查詢本月開始時間、結束時間 4、查詢本季度開始、結束時間 5、查詢本年度開始時間、結束時間 ...
datediff(week,zy_time,getdate())=0 //查詢本周 datediff(month,zy_time,getdate())=0 //查詢本月 本季:select * from table where datediff(qq,C_CALLTIME,getdate ...
/** * 日期工具類 */ public class DateUtils { /** * 獲取今天 * @return String * */ public static String getToday(){ return new ...
datediff(week,zy_time,getdate())=0 //查詢本周 datediff(month,zy_time,getdate())=0 //查詢本月 本季:select * from table where datediff(qq,C_CALLTIME,getdate ...
---------------------------------------------------------------------------------------------- ...