The second one, if he is trying to assign the time to abc_data.call_time field he could have just done as abc_data.call_time = STRING(time,"HH:MM:SS") no need to extra use substrings. 3 extra substrings elimiated and one assign statement - total of 4 errors.