You can translate the question and the replies:

Return Data for the past 6 months

Hi. I'd like to query the Denodo view via a querying tool (i.e. WinQSL) for the data from the last 6 months. I have tried the following, but I can't seem to get the Denodo syntax correct. select * from denodo_view where transaction_date >= getdate(subtract(getmonth(current_date), -5)) Any pointers would be appreciated. Thank you.
user
23-01-2020 11:12:17 -0500

1 Answer

Hi, I was able to query the Denodo view by using the **ADDMONTH()** Datetime Processing Function. I used a similar condition and able to receive results successfully. **For example:** ``` select * from <database_name>.<view_name> where <field_name> >= addmonth(current_date,-6) ``` For more details, you can refer to the [ADDMONTH](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/appendix/syntax_of_condition_functions/date_processing_functions#addmonth) section of the Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
24-01-2020 07:32:35 -0500
You must sign in to add an answer. If you do not have an account, you can register here