# 날짜만
SELECT DATE(NOW());
# 시간만
SELECT TIME(NOW());
# 연도만
SELECT YEAR(NOW());
# 달만
SELECT MONTH(NOW());
# 날짜만 포맷지정 "2021/03/24"
SELECT DATE_FORMAT(NOW(), '%Y/%m/%d');
# 시간만 포맷지정 "09 26 25"
SELECT DATE_FORMAT(NOW(), '%H %i %s');
# 최근 하루
SELECT * FROM TABLE_A WHERE DT BETWEEN DATE_ADD(NOW(), INTERVAL -1 DAY) AND NOW();
# 최근 일주일
SELECT * FROM TABLE_A WHERE DT BETWEEN DATE_ADD(NOW(), INTERVAL -1 WEEK) AND NOW();
# 최근 한달
SELECT * FROM TABLE_A WHERE DT BETWEEN DATE_ADD(NOW(), INTERVAL -1 MONTH) AND NOW();
# 날짜 지정
SELECT * FROM TABLE_A WHERE DATE_FORMAT(DT, '%Y-%m-%d') = '2022-10-19';
출처 : 여기