Is there a workaround to get D3.js to parse datetimes that have milliseconds included? I can't get this to work:
var parseDate = d3.time.format("%Y-%m-%dT%H:%M:%S").parse
parseDate("2011-01-01T12:14:35")
//that works
parseDate("2011-01-01T12:14:35.3456")
//returns null
If your dateTime strings are already in that format, you don't need d3 to parse it into an actual date object.
For example:
new Date("2011-01-01T12:14:35")
# Sat Jan 01 2011 04:14:35 GMT-0800 (PST)
results in a correct date object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With