I have an array which has 3 dates : 2014-11-20 2014-11-25 2014-11-30
and I need to compare if those date are between 2014-11-01 AND 2014-11-30
I am trying to unnest the array and then compare between those dates but it is not working.
Any ideas?
HERE you are a working example, tested on postgresql 9.3:
SELECT * FROM UNNEST(ARRAY['20141120', '20141125', '20141130']::date[]) AS mycolumn
WHERE mycolumn > '20141101'
AND mycolumn < '20141130';