Horje
convert excel date to javascript date Code Example
excel date to javascript date
// function to convert excel date to normal js date  
excelDateToJSDate(excelDate) {
    var date = new Date(Math.round((excelDate - (25567 + 1)) * 86400 * 1000));
    var converted_date = date.toISOString().split('T')[0];
    return converted_date;
}
convert javascript date into excel date
var record_date = Date.parse(item.record_date_string)
var days = Math.round((record_date - new Date(1899, 11, 30)) / 8.64e7);
item.record_date = parseInt((days).toFixed(10));

return item;
convert excel date to javascript date
function ExcelDateToJSDate(serial) {
   var utc_days  = Math.floor(serial - 25569);
   var utc_value = utc_days * 86400;                                        
   var date_info = new Date(utc_value * 1000);

   var fractional_day = serial - Math.floor(serial) + 0.0000001;

   var total_seconds = Math.floor(86400 * fractional_day);

   var seconds = total_seconds % 60;

   total_seconds -= seconds;

   var hours = Math.floor(total_seconds / (60 * 60));
   var minutes = Math.floor(total_seconds / 60) % 60;

   return new Date(date_info.getFullYear(), date_info.getMonth(), date_info.getDate(), hours, minutes, seconds);
}




Javascript

Related
javaScript Age in Dog years //write a function that takes your age and returns it to you in dog years - they say that 1 human year is equal to seven dog years function dog Years() javaScript javaScript Age in Dog years //write a function that takes your age and returns it to you in dog years - they say that 1 human year is equal to seven dog years function dog Years() javaScript
javascript string problems Code Example javascript string problems Code Example
Moto Racer game Code Example Moto Racer game Code Example
json api data fetch error Code Example json api data fetch error Code Example
javascript for loop that prints 10 times Code Example javascript for loop that prints 10 times Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7