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

Date issues



I want to get the number of weeks comes in startDate and endDate and i'm not getting the way.... so plz if anyone knows how to do it then let me know... thanks... in advance... :)



 you can have the number of hours in betwen two dates using below formula


numberOfHours =  ((finalStartOfWeek.getTime())/1000/60/60) - ((currentStartOfWeek.getTime())/1000/60/60);


and then divide the result with  24*7 .


I didn'y try this but that hour formula works perfect

Hope this helps