There is requirement to show Date range selected in seperate text boxes. For example if i have a Select list filter for Dates and i have selected date range between 01/01/2019 and 12/01/2019, i also want to show this date range as text " Date Range selected by User is "01/01/2019" and "12/01/2019". Let me know how to achieve this in Einstein Analytics
closed as unclear what you're asking by Reshma, Pranay Jaiswal, Markus Slabina, Sebastian Kessel, Himanshu Feb 3 at 16:37
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Are you trying to get the Days between those two dates?
Via APEX you can use the
Date date1 = Date.newInstance(2019, 1, 25); Date date2 = Date.newInstance(2019, 1, 30); String rangeDay = String.valueOf(date1.daysBetween(date2));
var date1 = new Date("1/25/2019"); var date2 = new Date("1/30/2019"); var rangeDay = Math.abs(date2.getTime() - date1.getTime()); var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));