question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reading from TSV - date (dd-MON-yy) comes through as integer

See original GitHub issue

Lines in TSV look like (see e-mail for full file) (and yes, this is fake data):

1	Emily	Fisher	efisher0@google.de	Female	161.31.81.163	89.64	15-NOV-2015	29-JAN-2016	89.62
2	Justin	Shaw	jshaw1@eepurl.com	Male	20.170.71.46	90.5	21-JUL-2016	28-MAR-2016	41.77

Doing a simple:

  let wb = XLSX.readFile('./local/input/tsv/SHORT_MOCK.txt', {
    FS: '\t',
    cellDates: true
  })
  XLSX.writeFile(wb, 'tsv.SHORT_MOCK.xlsx')

And my excel sheet dates look like: image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SheetJSDevcommented, May 9, 2017

Hmm My reading of the spec suggests that writing a date in XLSX would automatically imply the general date format. I guess not. That will be fixed in the next release

1reaction
SheetJSDevcommented, May 9, 2017

We just pushed 0.10.0. This version addresses most of the points here and you should see reasonable results. However, we are not done here.

The missing feature is preserving the original date format when reading the CSV (detecting that “15-NOV-2015” is actually of the form dd-mmm-yyyy) and we need an eversion of the SSF formatting process. Keep open for now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Read csv with dd.mm.yyyy in Python and Pandas
So, the Column with the dates is not recognized as such. What am I doing wrong here? Or is this date format simply...
Read more >
Formatting Dates for CSV Imports - Administration - Echo360
Some of the CSV imports contain date fields, in particular the capture/schedules import. The required format for date fields is yyyy-mm-dd.
Read more >
6 Ways to Fix Dates Formatted as Text in Excel
6 ways to fix dates formatted ast text in Excel, plus a bonus technique using Power Query to fix various formats.
Read more >
Date Format changing after reading CSV - Help
The date in CSV file is in dd-MM-yyyy format. After i use a Read CSV activity the date is changed to yyyy-MM-dd format...
Read more >
datetime dates converted to wrong date when Imported from ...
Solved: Hi there, When import csv file with date column like below, SAS data will have a small percentage of rows showing incorrect...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found