Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two time variables "Call Start" and "Time Created," I am looking to create an if statement that occurs only when the two variables are within 30 minutes of one another (i.e. if the Time Created occurs 30 minutes or less after the Call Start(ed))
Thanks!
Something like...:
If([Time Created] - [Call Start] > 1/48, 'Yes', 'No')
Assuming both fields are time stamps.
How do you get the fraction 1/48 from the time stamps?
Thanks!
Emma
Dates (including time) are stored as numbers. A date is the whole number (the part before the decimal point), the time are the fractions of the number (the part behind the decimal point).
So if you wanted to check if the difference is more then 1 day, you would have made it > 1.
But you want to check if the difference is more then 30 minutes. To get to minutes, you divide 1 by 1440 (the number of minutes in a day). You want 30 minutes, so 30 * 1/1440 = 1/48. 48 is the number of half hours in a day.
I hope that clears things up for you .