Hi,
I have two variables in pl/pgsql function.
p_fromdate and p_todate
I have another variable which represents intervals like day, month, quarter etc.
p_interval as smallint, to hold values like 1,2,3, which are substituted for intervals as '1 day', '1 month - 1 day', '3 months - 1 day' respectively.
Now, I have to find if the period of given two dates (p_todate - p_fromdate) is multiples of the given interval or not?