Format number to time d3js
<p>I have a dataset that looks like this</p>

<pre><code>date,lenght,sort
201506131449,2,1
201506131449,7,0
201506131450,35,1
201506131450,7,1
</code></pre>

<p>But then a lot more entries.</p>

<p>De date is currently formated like
201506131450 which is 2015 - 06 - 13 14:50 where 14:50 is military time so (2:50pm)</p>

<p>I need to keep the format like this for sorting purposes in python.</p>

<p>Anyway. Right now The labels output the huge number. While I only want the military time part.</p>

<p>So 201506131450 should be labeld 14:50</p>

<p>Current code:</p>

<pre><code>var x = d3.scale.linear()
.range([0, width]);

var xAxis = d3.svg.axis()
    .scale(x)
    .orient("bottom")
    .ticks(5);

x.domain(d3.extent(data, function(d) { return d.date; }));
</code></pre>

<p>This produce the labels on the x axis like: 201,506,131,600</p>

<p>How can I change that to 16:00</p>

<p>Thanks in advance!</p>