Still trying to make an hourly call log report. I have gotten some progress but I am not getting the correct results.
Here is the entry that I have made for a formula, Otime and Omeridian are values that only exist in the formula.
When I do this report the AM times dont show up and a few times are mixed up(some 2pm are called 10am). Is there an easier way?
Thank you!
StringVar Array Otime:= ["1:00","2:00","3:00","4:00","5:00","6:00","7:00","8:00","9:00","10:00","11:00","12:00"] ;
StringVar Array Omeridian:= ["a","p"];
if {TASKS.OPENTIME} > '12:59p' and {TASKS.OPENTIME} < '2:00p' then Otime[1]+Omeridian[2]
else
if {TASKS.OPENTIME} > '1:59p' and {TASKS.OPENTIME} < '3:00p' then Otime[2]+Omeridian[2]
else
if {TASKS.OPENTIME} > '2:59p' and {TASKS.OPENTIME} < '4:00p' then Otime[3]+Omeridian[2]
else
if {TASKS.OPENTIME} > '3:59p' and {TASKS.OPENTIME} < '5:00p' then Otime[4]+Omeridian[2]
else
if {TASKS.OPENTIME} > '4:59p' and {TASKS.OPENTIME} < '6:00p' then Otime[5]+Omeridian[2]
else
if {TASKS.OPENTIME} > '5:59p' and {TASKS.OPENTIME} < '7:00p' then Otime[6]+Omeridian[2]
else
if {TASKS.OPENTIME} > '6:59p' and {TASKS.OPENTIME} < '8:00p' then Otime[7]+Omeridian[2]
else
if {TASKS.OPENTIME} > '7:59p' and {TASKS.OPENTIME} < '9:00p' then Otime[8]+Omeridian[2]
else
if {TASKS.OPENTIME} > '8:59p' and {TASKS.OPENTIME} < '10:00p' then Otime[9]+Omeridian[2]
else
if {TASKS.OPENTIME} > '9:59p' and {TASKS.OPENTIME} < '11:00p' then Otime[10]+Omeridian[2]
else
if {TASKS.OPENTIME} > '10:59p' and {TASKS.OPENTIME} < '12:00a' then Otime[11]+Omeridian[2]
else
if {TASKS.OPENTIME} > '11:59p' and {TASKS.OPENTIME} < '1:00a' then Otime[12]+Omeridian[1]
else
if {TASKS.OPENTIME} > '12:59a' and {TASKS.OPENTIME} < '2:00a' then Otime[1]+Omeridian[1]
else
if {TASKS.OPENTIME} > '1:59a' and {TASKS.OPENTIME} < '3:00a' then Otime[2]+Omeridian[1]
else
if {TASKS.OPENTIME} > '2:59a' and {TASKS.OPENTIME} < '4:00a' then Otime[3]+Omeridian[1]
else
if {TASKS.OPENTIME} > '3:59a' and {TASKS.OPENTIME} < '5:00a' then Otime[4]+Omeridian[1]
else
if {TASKS.OPENTIME} > '4:59a' and {TASKS.OPENTIME} < '6:00a' then Otime[5]+Omeridian[1]
else
if {TASKS.OPENTIME} > '5:59a' and {TASKS.OPENTIME} < '7:00a' then Otime[6]+Omeridian[1]
else
if {TASKS.OPENTIME} > '6:59a' and {TASKS.OPENTIME} < '8:00a' then Otime[7]+Omeridian[1]
else
if {TASKS.OPENTIME} > '7:59a' and {TASKS.OPENTIME} < '9:00a' then Otime[8]+Omeridian[1]
else
if {TASKS.OPENTIME} > '8:59a' and {TASKS.OPENTIME} < '10:00a' then Otime[9]+Omeridian[1]
else
if {TASKS.OPENTIME} > '9:59a' and {TASKS.OPENTIME} < '11:00a' then Otime[10]+Omeridian[1]
else
if {TASKS.OPENTIME} > '10:59a' and {TASKS.OPENTIME} < '12:00p' then Otime[11]+Omeridian[1]
else
if {TASKS.OPENTIME} > '11:59a' and {TASKS.OPENTIME} < '1:00p' then Otime[12]+Omeridian[2]
Here is the entry that I have made for a formula, Otime and Omeridian are values that only exist in the formula.
When I do this report the AM times dont show up and a few times are mixed up(some 2pm are called 10am). Is there an easier way?
Thank you!
StringVar Array Otime:= ["1:00","2:00","3:00","4:00","5:00","6:00","7:00","8:00","9:00","10:00","11:00","12:00"] ;
StringVar Array Omeridian:= ["a","p"];
if {TASKS.OPENTIME} > '12:59p' and {TASKS.OPENTIME} < '2:00p' then Otime[1]+Omeridian[2]
else
if {TASKS.OPENTIME} > '1:59p' and {TASKS.OPENTIME} < '3:00p' then Otime[2]+Omeridian[2]
else
if {TASKS.OPENTIME} > '2:59p' and {TASKS.OPENTIME} < '4:00p' then Otime[3]+Omeridian[2]
else
if {TASKS.OPENTIME} > '3:59p' and {TASKS.OPENTIME} < '5:00p' then Otime[4]+Omeridian[2]
else
if {TASKS.OPENTIME} > '4:59p' and {TASKS.OPENTIME} < '6:00p' then Otime[5]+Omeridian[2]
else
if {TASKS.OPENTIME} > '5:59p' and {TASKS.OPENTIME} < '7:00p' then Otime[6]+Omeridian[2]
else
if {TASKS.OPENTIME} > '6:59p' and {TASKS.OPENTIME} < '8:00p' then Otime[7]+Omeridian[2]
else
if {TASKS.OPENTIME} > '7:59p' and {TASKS.OPENTIME} < '9:00p' then Otime[8]+Omeridian[2]
else
if {TASKS.OPENTIME} > '8:59p' and {TASKS.OPENTIME} < '10:00p' then Otime[9]+Omeridian[2]
else
if {TASKS.OPENTIME} > '9:59p' and {TASKS.OPENTIME} < '11:00p' then Otime[10]+Omeridian[2]
else
if {TASKS.OPENTIME} > '10:59p' and {TASKS.OPENTIME} < '12:00a' then Otime[11]+Omeridian[2]
else
if {TASKS.OPENTIME} > '11:59p' and {TASKS.OPENTIME} < '1:00a' then Otime[12]+Omeridian[1]
else
if {TASKS.OPENTIME} > '12:59a' and {TASKS.OPENTIME} < '2:00a' then Otime[1]+Omeridian[1]
else
if {TASKS.OPENTIME} > '1:59a' and {TASKS.OPENTIME} < '3:00a' then Otime[2]+Omeridian[1]
else
if {TASKS.OPENTIME} > '2:59a' and {TASKS.OPENTIME} < '4:00a' then Otime[3]+Omeridian[1]
else
if {TASKS.OPENTIME} > '3:59a' and {TASKS.OPENTIME} < '5:00a' then Otime[4]+Omeridian[1]
else
if {TASKS.OPENTIME} > '4:59a' and {TASKS.OPENTIME} < '6:00a' then Otime[5]+Omeridian[1]
else
if {TASKS.OPENTIME} > '5:59a' and {TASKS.OPENTIME} < '7:00a' then Otime[6]+Omeridian[1]
else
if {TASKS.OPENTIME} > '6:59a' and {TASKS.OPENTIME} < '8:00a' then Otime[7]+Omeridian[1]
else
if {TASKS.OPENTIME} > '7:59a' and {TASKS.OPENTIME} < '9:00a' then Otime[8]+Omeridian[1]
else
if {TASKS.OPENTIME} > '8:59a' and {TASKS.OPENTIME} < '10:00a' then Otime[9]+Omeridian[1]
else
if {TASKS.OPENTIME} > '9:59a' and {TASKS.OPENTIME} < '11:00a' then Otime[10]+Omeridian[1]
else
if {TASKS.OPENTIME} > '10:59a' and {TASKS.OPENTIME} < '12:00p' then Otime[11]+Omeridian[1]
else
if {TASKS.OPENTIME} > '11:59a' and {TASKS.OPENTIME} < '1:00p' then Otime[12]+Omeridian[2]