5 Replies Latest reply: Mar 2, 2016 10:52 AM by Lauren Spring RSS

    Interval and Number comparison

    Lauren Spring

      Hi all,

       

      So I have a time interval declared at load which shows the difference between the entry and exit time in minutes:

       

                Interval([ExitedTime]-[EnteredTime],'mm') As [DurationActual]

       

      And a [Duration] field which has set amounts of 15, 30, 45, 60, 75 and 90 representing minutes allotted to a client.

      I wanted to compare the two to show whether a client stayed within their allotted time allowance and use a background colour expression to indicate if they were over or under:

       

                 if([DurationActual]>[Duration],red(),green())

       

      This always shows as green though even when DurationActual is higher than the Duration. I'm thinking it is an issue with the formatting when comparing the two. Can anyone advise on how to convert either of them into comparable formats?

       

      Many thanks.