I'm trying to get a decimal value for a value that is expressed in a date. My problem is that I need only the time in the date, not the actual date itself. So here part of my .json data:
var data = [
{
"Id":"1390794254991",
"Tz":"Europe/Amsterdam",
"From":"27. 01. 2014 4:44",
"To":"27. 01. 2014 12:09",
"Sched":"08. 02. 2014 5:24",
"Hours":"7.430"
}]
So basically i would like to take the "From" value and get just the time returned in a decimal value. I don't think converting the time to a decimal number with Time Formatting, it's just the splitting of a value that seems pretty hard to me. Any of you guys have a clue how this could be achieved?
Thanks,
Cas
Edit: Okay, here we go. I made a JSFiddle to clear things up. Because there is a TIME (HH:MM) in my date, the rectangles in my barchart don't come on a specific day in the xAxis. INSTEAD they come out on a day AND time on the xAxis.
I just need it to be the specific date, not the date AND time.
I think I have to change something in the following part:
dataFiltered.forEach(function(d) {
d.From = parseDate(d.From);
});
Just don't really see what...