201
Views
5
Comments
Preparation only show rows between two dates
Hi there,

Okay so I have an app that captures orders and displays them. Not I show all orders in a table, I now however only want to show orders for a spesific month. Or if possible even more spesific, from the 20th of each month to the 20th of the next month. Example: BETWEEN 20-07-2014 AND 20-08-2014.

Can I do this using the date picker? but only select a month. Or should I use an advance query. 

Please see the images below.

Thank you in advance




2020-03-05 15-52-45
André Vieira
Staff
Hi Heinrich,

Yes you can do this with a Simple Query. Use:

Order.Date >= #20-07-2014# and Order.Date <= #20-08-2014#
If you wan to target a specific month you can also do:

Month(Order.Date) = Month and Year(Order.Date) = Year
where Month and Year are input parameters of your query.

Cheers
UserImage.jpg
Heinrich Schmidt
Thanks allot for the quick reply @André Vieira

Slight problem, it says its expecting an expression instead of #


Thanks again, meanwhile om going to test the the date picker. 

Kind Regards
2016-04-21 18-13-58
Nuno Rolo
 
MVP
Hi Heinrich,

The better way is to use two inputs of type Date and use in the conditions.

I also advise to watch the videos here.
UserImage.jpg
Heinrich Schmidt
Thanks allot!

I appreciate immensly! :D

I have watched most of the videos but couldnt figure this one problem out. But I now have it! 

Kind Regards
2020-03-05 15-52-45
André Vieira
Staff
Hi Heinrich,

Regarding the error, my bad the format of a date literal is Y-M-D so it should be #2014-07-20# and not #20-07-2014#.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.