Hi to all, sorry if this question has been raised but I could find answer to my problem.
I have a data base which has the following format:
My problem is as follows:
I have created separate graphs which will display daily, weekly and monthly sales figures. The graphing is fine but the main issue I am having at times is retrieving data from the database with using the a date range as the selection criteria.
I am using the following code to retrieve data (monthly example):
Now this works well when (example , start date:01/04/2020 and end date:30/04/2020):
The date stipulate is found within the database from start to finish.
It does not work well when (example; start date: 10/04/2020 and end date: 09/05/2020 )
if either the start date or end date is not found withing the database. So current date is 09/05/2020 and there are no records in the 05 month but there are records in the 04 month. basically there is data in that range but the database has no entry for the 05 month.
I am abit confused as the code I'm using is from the start date or later until the end date or earlier (>= start date and <= end date). With my little understanding that the above shouldn't be a problem if at least one value is found within that date range. That however is not the case and it returns an empty array even though I can see that database contains some entries within that specific range.
Your assistance would be much appreciated