Subscribe to web2feel.com
Subscribe to web2feel.com

filter date between a mount mysql

Diposting oleh Unknown Kamis, 30 Mei 2013

SELECT t.*
from t_nt t
where tgl_akta BETWEEN (SELECT date_format(date_sub(curdate(), interval 0 month), '%Y-%m-01') AS a)and
( select date_sub(date_format(curdate(), '%Y-%m-'+LAST_DAY(CURRENT_DATE)), interval 0
day) AS b)