postgresql 9.1 - Query for taking data between two specific months and two specific year in postgressql -


i want data between month1 year1 month2 year2

example jan 2016 jan 2017.

i have query like

select * customer cr   extract(month cr.regdate) between month1 , month2 ,   extract(year cr.regdate) between year1 , year2 

this query giving wrong result when take data jan 2016 jan 2017. expecting data jan 2016, feb 2016, mar 2016 till jan 2017. giving result jan 2016 , jan 2017. please guide me.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -