I’m trying to find the number between two dates. I tried to remake this JS code in Thunkable:
const startDate = '2020-01-01'; const endDate = '2020-03-15'; const diffInMs = new Date(endDate) - new Date(startDate) const diffInDays = diffInMs / (1000 * 60 * 60 * 24); console.log(diffInDays)
I tried to get the milliseconds between the two dates by subtracting them and then dividing them 8640000 to turn them back to # of days. but got stuck when i try to get the new Date value.
Here are the blocks so far:
I’ve been unsuccessful, has anyone found a way to easily do this?