08/02/2023 12:57 AM
Hi Team,
We have termination date in one of the customproperty,now for the analytics we want to add it as filterable. So it is possible to add date picker?. Currently it is as shown below:
we want it how it is for onboarding date which is in startdate field like below:
Please let me know how this can be achieved.
Thanks,
Harsha
08/02/2023 01:43 AM
You can check the Show Merged View in Analytics module in the Global configuration.
Then you get an option of date picker also.
08/02/2023 02:05 AM
Hi @nimitdave ,
I didnt find this option in global config. Can you tell me where can I get it?
Thanks,
Harsha
08/02/2023 01:52 AM
Hi @Harsha ,
Please use the below MySQL function to convert the string to date and to have a date picker in the analytics history filter. Let me know if this helps!
STR_TO_DATE(users.customproperty2,'%d,%m,%Y')
08/02/2023 02:06 AM
08/02/2023 04:53 AM
@Harsha thanks for confirming. Can you please share the query you're using?
08/02/2023 04:33 AM
Global Configuration --> Analytics
08/02/2023 04:49 AM
Hi,
Thank you for the reply we already have that configured. So basically we want to have the date picker to that customproperty as report will be analyzed by client side IT people. They should be able to pick the range and export it. Due to some dependencies we have termination date stored in CP. As given in above screenshots. Is it possible?
Thanks,
Harsha
08/02/2023 05:13 AM
Yes so you can have a query similar to below:
select username, firstname, lastname,statuskey,startdate from users where startdate > ${sdate} and enddate < ${edate}
Replace startdate with your cp and also do the date conversion from str to date as suggested by @naveenss and then click on preview .
Select data type for sdate and edate as Date and click on save.
Check the filtetable check box.
Run the report.
Go to history page and open the history of the created report.
You should be able to see date picker for sdate and edate
Only for a dynamic attribute of type date you can do a date picker in history also.