I am trying to subtract a clock from a given date time string using javascript. My code is similar:
var cbTime = new Date();
cbTime = selectedTime.setHours(-5.5);
Where selectedTimeis the given time (the time I pass as a parameter).
So, suppose there selectedTimeis Tue Sep 16 19:15:16 UTC+0530 2014
I get:1410875116995
I want to get a response in datetime format. Am I something wrong here? Or is there another solution?
source
share