Using xsxl to import excel, it was found that there was something wrong with the date import, and it became a five-digit figure, for example, 43383 in 2018-10-10.

Baidu knows that it can be solved by adding a semicolon before the date, but how to convert it to a normal date in the JS code

Mar.21,2022

/**
 * @param excelTime
 * @returns {number}
 */
function excel_time_to_timestamp(excelTime) {
  const second = 25569,
    day_timestamp = 24 * 60 * 60 * 1000;
  return (+excelTime - second) * day_timestamp;
}

you can use this algorithm to convert excel time into the correct timestamp

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5fbab-45843.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5fbab-45843.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?