node.jsexceltimestampmomentjs

Excel date coming through with timezone


I am importing an excel spreadsheet into my node.js application. I do not own this spreadsheet and I am trying to find out how its formatted so I can re-produce it.

This spreadsheet came into me with a list of dates (DD/MM/YYYY), but when I import them into my application, they come with a timezone when converting to a timestamp... e.g:

Mon Apr 05 1976 00:00:00 GMT+0100 (British Summer Time)
Mon Jan 01 1985 00:00:00 GMT+0000 (Greenwich Mean Time)

When I try to create my own excel with dates and import it to my app, the dates do not have the GMT+0100 times...

What formatting in excel causes this? I have also observed that I cannot convert the dates in excel to a number or any other format, it stays the same.

Any ideas? Thanks in advance!


Solution

  • I was feeding some spreadsheets into my application and it appears some of these spreadsheets had the dates stored in a text format.

    To reproduce I made a text-formatted cell and then copied it into my sheet. This meant it could not be converted into a date format in excel.