我正在尝试解析D3.js中.csv文件的日期时间值,但由于某种原因,我一直都是null。这是我的,
.csv数据:
"","date","count"
"1","2011-11-15 02:00:01",1
"2","2011-11-15 02:00:02",2
"3","2011-11-15 02:00:03",1
"4","2011-11-15 02:00:04",1
"5","2011-11-15 02:00:05",1
"6","2011-11-15 02:00:07",1
var parseDate = d3.time.format("%I:%M %p").parse;
当我console.log(parseDate(d.date))
时,我得到空。我也尝试了console.log(parseDate(d.date.toString()))
,但我仍然是null。为什么不解析?