mysql查詢(xún)一天,一周等隔日數(shù)據(jù)_MySQL
來(lái)源:懂視網(wǎng)
責(zé)編:小采
時(shí)間:2020-11-09 18:22:41
mysql查詢(xún)一天,一周等隔日數(shù)據(jù)_MySQL
mysql查詢(xún)一天,一周等隔日數(shù)據(jù)_MySQL:bitsCN.com mysql查詢(xún)一天,一周等隔日數(shù)據(jù) --查詢(xún)一天select * from tbl_order where date(tbor_create_time) = curdate();select * from tbl_order where to_days(tbor_create_time) = to_days(now())
導(dǎo)讀mysql查詢(xún)一天,一周等隔日數(shù)據(jù)_MySQL:bitsCN.com mysql查詢(xún)一天,一周等隔日數(shù)據(jù) --查詢(xún)一天select * from tbl_order where date(tbor_create_time) = curdate();select * from tbl_order where to_days(tbor_create_time) = to_days(now())
bitsCN.com
mysql查詢(xún)一天,一周等隔日數(shù)據(jù)
--查詢(xún)一天
select * from tbl_order where date(tbor_create_time) = curdate();
select * from tbl_order where to_days(tbor_create_time) = to_days(now());
--查詢(xún)一個(gè)周
select * from tbl_order where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(tbor_create_time);
--查詢(xún)一個(gè)月
select * from tbl_order where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(tbor_create_time);
--兩個(gè)日期之間的數(shù)據(jù)
select * from tbl_order where tbor_create_time>'2012-01-20 00:00:00' and tbor_create_time<'2012-02-7 00:00:00';
bitsCN.com
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
mysql查詢(xún)一天,一周等隔日數(shù)據(jù)_MySQL
mysql查詢(xún)一天,一周等隔日數(shù)據(jù)_MySQL:bitsCN.com mysql查詢(xún)一天,一周等隔日數(shù)據(jù) --查詢(xún)一天select * from tbl_order where date(tbor_create_time) = curdate();select * from tbl_order where to_days(tbor_create_time) = to_days(now())