Use if...else in programming, as Valery shows. You can simplify the expression you show. In the first line t must be less than 123, in which case it can not be greater than 124. So you have three cases:
i figured it out but thanks. but i need help with differential equation. so far i have something like this(mathcad file) a have to do something like this(screenshoot). i wolud appreciate any help. i also made a post i physics section.