I have the following timestamp (example) 20131024010907
that I would like to convert to date format. I will be subtracting the time stamp from another timestamp. For example:
20131024010907 - 20131024010856 = 11 seconds have elapsed
The problem is that if I subtract the timestamps as is, it will not work properly. E.g.
var x = 20131024010907
var y = 20131024010856
x-y != 11
x-y = 51
How would I convert these timestamps to dates in javascript so I can subtract them from each other? Is this possible?