How to add whole day in reporting module endDate?

reporting
Tags: #<Tag:0x00007fb860841af0>

(Kundan Sinha) #1

How to add whole day in reporting module endDate?

Currently if we select parameter of start date and end date as startDate and endDate it leave the last day out. Eg: if we select 31st August as our endDate it shows result till 30th August. This can we resolved if we use HH:MM:SS with endDate.


(Mike Seaton) #2

@kundansinha - most of the underlying calculations in the reporting module should automatically behave the way you desire. The general approach is:

  • If an endDate property is passed in, and there is no time component (i.e. the time is set to midnight - 00:00:00 ), then set the time component to the end of the day (i.e. 11:59:59.999). This has the effect of including all data entered any time during the endDate, so endDate is fully inclusive.

  • If an endDate property is passed in, and there is a specific time component (i.e. not midnight), then assume that this is intentional and run the calculation up to the specific datetime passed in.

Are there specific Definitions that you are trying to evaluate that you feel do not respect this? If you can provide examples, we can investigate the behavior.

Mike


(Kundan Sinha) #3

No specific defination. I am creating custom SQLdataset.

How to include (11:59:59) with endDate?

Is there any way to add it in advance configuration?


(Mike Seaton) #4

@kundansinha, in a generic data set like this the framework does not automatically apply these rules, as it may not always apply. And there is no current way to specific time on a date component, as you describe, as far as I know.

Could you tackle the problem within your SQL queries directly? For example, use an existing SQL function or create a new SQL function like endOfDay(:endDate) and see if that works?

Mike


(Kundan Sinha) #5

Thanks Mike

I will look into it.


(Kundan Sinha) #6

SQL query to tackle endDate. We increased endDate by 24 Hrs.

DATE_ADD(:endDate, INTERVAL 1 DAY)