Select MySQL 3 months values -


i need select 3 month's values database except first day values of third month.

for example:

i want select values 3 months since now: may, april, march without values 1 march

every day of month has 24 hour values temperature , want exclude first day of third month said before.

thank you!!

get first day of month(in 3 months) - how first day of every corresponding month in mysql?

cast(date_format(date_add(now(),interval 2 month) ,'%y-%m-01') date) 

get query between dates:

date between now() , date_add(now(), interval 3 month) 

and query should like:

where date between now() , date_add(now(), interval 3 month) , date != cast(date_format(date_add(now(),interval 2 month) ,'%y-%m-01') date) 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -