How can I get the difference between target day and current day using Javascript? | XM Community
Skip to main content
How can I get the date difference between Target date and Current Day using Javascript given that the Target date will be scripted using a Date Picker and Current Date is equal to the current system time? i need to get the difference in day.
Below code will help



var date1 = new Date();

var date2 = new Date("07/30/2019"); //get the date from textbox

var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24);





Set the above 'Difference_In_Days ' in ED
Thank you! This is quite helpful.

Leave a Reply