How I will convert this time 11:34 to javascript timestamps. Any javascript functionality available for that.
I am trying to create a floting graph for that I am using Flot library. In my graph time on x axis and count on y axis. For creating data part I need to convert time to timestamp like that thay specified on API doc.
http://people.iola.dk/olau/flot/API.txt
This is my code
var datasets = {
"usa": {
label: "Logged Users",
data: [[10:55, 4], [11:00, 1], [11:05, 4], [11:10, 2], [11:15, 3], [11:20, 1], [11:25, 5]]
}
};
if (datasets.length > 0){
$.plot($("#placeholder"), datasets, {
yaxis: { min: 0,tickDecimals: 0 },
xaxis: { mode: "time",timeformat: "%H:%M" }
});
}
It will not work because I specified exact time instead of a number. So I need to convert that to timestamps format.
Please help me.
Thanks