If you want to calculate the number of days between 2 events in Office Autopilot (OAP) then use this script.
Use case example:
I’ve got a funnel that will take people down 1 of 2 paths depending on how fast they are consuming content.
If the user is consuming the content quickly we will keep the content coming. This is the fast path. We determine if they should go down that path if the days since they joined the list and the days they watched the first video are 0.
It looks like:
[DATE WATCHED VIDEO 1] – [DATE ADDED] = x
So let’s assume they joined today, watched the first video to completion it would be:
2013-08-13 minus 2013-08-13 = 0 days
So they go down the fast path sequence and are delivered the next piece of content.
The Normal Path
If the user joined yesterday but didn’t watch until today, then their ‘days since’ would be 1. Since it is not 0 we send them down the regular path and they get the next piece tomorrow.