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

  • 2
    what work have you done so far, and where are you stuck? – David Cheng Jan 25 '19 at 18:24

Are you trying to get the Days between those two dates?

Via APEX you can use the daysBetween method:

Date date1 = Date.newInstance(2019, 1, 25);
Date date2 = Date.newInstance(2019, 1, 30);
String rangeDay = String.valueOf(date1.daysBetween(date2));

Via Javascript:

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

Reference: Source 1Source 2

  • 1
    The OP appears to be asking for a solution within Einstein Analytics – David Cheng Jan 25 '19 at 18:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.