Problem While calculating distance beetween two dates (it return NAN)

Hey guys,
I’m just calculating the distance of between two dates in the spark ar script (in js)
Here is my code, it’s working great in the web based and html but returns NAN in spark ar.


is there anything that i missed to do in this script or …?
Appreciate all your helps.

I think the date string parsing doesn’t work in spark, so you can’t say “March 23…”. You can use some other methods to set the date.

yes actually i did it this way and it’s okay now