function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ajith MDAjith MD 

Im getting error like Nan during subtraction of two times. Can anyone help me how to resolve this

Im getting error like Nan during subtraction of two times. Can anyone help me how to resolve this?

var startDate = component.get("v.time");
        var endDate = component.get("v.time1");
        var days = (endDate-startDate)/8.64;
        alert(days);

please say me how to find difference between two times not two days
Nayana KNayana K
var startDate = component.get("v.time");
var endDate = component.get("v.time1");
alert('Start Date =>', startDate, '===', typeof startDate);
alert('endDate =>', endDate , '===', typeof endDate);


hey please try this and let me know what are the ouputs of start and end date.
        
Ajith MDAjith MD
Im getting like startDate as in alert box
Ajith MDAjith MD
Im getting like start Date  and endDate in alert window by tring this "alert('Start Date =>', startDate, '===', typeof startDate);
        alert('endDate =>', endDate , '===', typeof endDate);"