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
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));