convert javascript date into excel date

Solutions on MaxInterview for convert javascript date into excel date by the best coders in the world

showing results for - "convert javascript date into excel date"
Selim
08 May 2019
1// function to convert excel date to normal js date  
2excelDateToJSDate(excelDate) {
3    var date = new Date(Math.round((excelDate - (25567 + 1)) * 86400 * 1000));
4    var converted_date = date.toISOString().split('T')[0];
5    return converted_date;
6}
Camila
28 Mar 2016
1file:///C:/Users/GEMBA/OneDrive/Desktop/NEW/7860.html
Kenzo
22 Feb 2019
1var record_date = Date.parse(item.record_date_string)
2var days = Math.round((record_date - new Date(1899, 11, 30)) / 8.64e7);
3item.record_date = parseInt((days).toFixed(10));
4
5return item;