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.

Failing to parse dates

See original GitHub issue

When I use the timeseries type, I keep getting the “Failed to parse x to Date object” error. On dates like ‘2014-08-12T00:00:00.000Z’, which when I try to make with new Date in the console, work just fine. Any idea why this is happening?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:27 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
aubricuscommented, Oct 9, 2015

Just ran into this myself. The format suggested earlier does not actually match the date format requested in the original post.

Got lucky and found a helpful hint here in the D3 wiki about ISO formatting.

This worked for me:

2reactions
masayuki0812commented, Sep 4, 2014

Hi, please try data.xFormat if you load datetime string:

data: {
  ..
  xFormat: '%Y-%m-%d %H:%M:%S'
  ..
}

UPDATE: I updated the reference in c3js.org. Sorry for the confusion and poor document.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 'failed to parse date' for Date Time Field with Data Loader
Valid formatting for Date/Time fields in the API are documented in the following resources:Format the 'Date' and 'Date Time' data in a CSV ......
Read more >
Find dates that fail to parse in R Lubridate - Stack Overflow
I first sorted the raw csv column and did a head() & tail() to find which 3 dates were causing trouble; Alternatively which(is.na(dates$datetime)) ......
Read more >
Unable to parse Date, CSV Imports - Jira - Atlassian Community
I am using dd-MM-yyyy format, And getting this error. Please make sure you are using the same format in both the CSV file...
Read more >
User friendly date-time parsing functions - lubridate
parse_date_time() parses an input vector into POSIXct date-time object. ... This might result in All formats failed to parse error. See notes below....
Read more >
DateTime.Parse Method (System) - Microsoft Learn
If the parsing operation fails because of an unrecognized string format, the Parse method throws a FormatException, whereas the TryParse method returns ...
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