In line 2, the stats command is unnecessary, because you overwrite the value of tnow in line 3 with the time that this search began. Did you really mean to use now()? I would have expected to use _time, but then I don't understand the condition you are testing. Finally, you seem to be manipulating the time to pick off certain characters in lines 3-5, but this seems like a hard way to do it.
Why not do this?
sourcetype="pivotsource" OR sourcetype="vodplayerrors_animation"
| eval m = strftime(now(),"%M")
| eval switcherValue=case(m==55,voderrorcode,
| stats count by switcherValue
I was too lazy to figure out what all the substr was about, so i just set m to the minutes portion of the time. If you wanted some other part of the time, look here for the codes: Common Time Format Variables
Also, note that I added a third option to the case function - what if m is something other than 55 or 56? In that case, I set switcherValue to null, but you could set it to something else.