I am trying to get the :mm: of a time field (which is hh:mm:ss)to round up or down to the nearest half hour depending on which period it is in. So I need the minutes to be "00" if it is between 08:01 and 08:30 or "30" if between 08:31 and 09:00.
I am using the following formula
if (TrimRight ({@StartTime} [4 to 5])) >= "1" and
(TrimRight ({@StartTime} [4 to 5])) < "31" Then
"30" else
"00"
Now it almost works but it is doing something a little wierd that I can't work out. Anything between "01" and "09" brings up a value of "00" when it should be "30"
Any suggestions? I'm stumped.
I am using the following formula
if (TrimRight ({@StartTime} [4 to 5])) >= "1" and
(TrimRight ({@StartTime} [4 to 5])) < "31" Then
"30" else
"00"
Now it almost works but it is doing something a little wierd that I can't work out. Anything between "01" and "09" brings up a value of "00" when it should be "30"
Any suggestions? I'm stumped.