AnsweredAssumed Answered

Searching records by month

Question asked by jdevans on Oct 24, 2016
Latest reply on Oct 24, 2016 by mike_wallace_rcc

I have a table that stores records (for a very specific reason) using a Month field (1-12), separately from the Year field (4-digit year) instead of just using a single date field.


I have a script that runs a find against the records in that table by a date range (this month, last month, this quarter, last quarter, this Half-year, last half-year, etc...), but as the year nears end, I found a problem that previously wasn't tested. If the date range spans over a new year, the find fails.


So as of right now, there is data in that table for the current month (10, 2016). I can run a find against the table using "10..." in the Month field and find records. However, if I use the following, it fails "10...3". Even if I simultaneously enter in 2016...2017 into the Year field, it fails. I think it is getting hosed-up because it fails to correctly interpret the "10...3" as October this year through March next year.


Any thoughts on a solution?