Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Please can you help:
I am trying to create a formula that will calculate the date/ time diiference between two times and depending on this number in minutes, I want it to display whether it is a late start by how many minutes, early start by how many minutes or started on time.
= (if (interval( session_actual_start - scheduled_start, 'mm') >-10, 'Started ' & interval (session_actual_start-scheduled_start, 'mm') & ' mins early',
if(session_start_difference >=-10 and session_start_difference <=10, 'Started On Time',
if (interval(session_actual_start - scheduled_start, 'mm') >10, 'Started ' & interval (session_actual_start-scheduled_finish, 'mm') & ' mins late'))))
This is the formula, which is working for Early starts but not picking up late starts, it still showing early start even though it is late.
Also, when it shows an early start it says: Started -50 mins early, how do I get rid of the - infont of the number?
Hope this makes sense and someone can help!
Thanks,
You can use the fabs() function so that negative numbers are made positive:
if (interval( session_actual_start - scheduled_start, 'mm') <-10, 'Started ' & interval (fabs(session_actual_start-scheduled_start), 'mm') & ' mins early',...etc