I would first go through [Datetime Processing Functions](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/appendix/syntax_of_condition_functions/date_processing_functions) available in Denodo to get the list of days between two dates.
If the existing functions do not produce the expected results then I will go ahead and create a new Custom function. I will refer [Developing Custom Functions](https://community.denodo.com/docs/html/browse/7.0/vdp/developer/developing_extensions/developing_custom_functions/developing_custom_functions) section of Virtual DataPort Developer Guide for more details on the same.
I find using Denodo 4E plugin easy to develop custom functions because it adds the required libraries to the classpath of the project, provides the capability of debugging the extension you are developing, etc. The [Denodo4E User Guide](https://community.denodo.com/docs/html/browse/7.0/denodo4e/index#denodo4e-user-guide) explains how to use it.
Hope this helps!