I have been able to get the following sql to work - "select if(month(policydate)<=6),month(policydate),month(policydate)-6) as mth from mytable". I would like to be able to do the following
"select if(month(now()<6,(if(month(policydate)>6 ,month(policydate)-6,month(policydate)))...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.