What's the RDBMS and the query? You should eliminate the date and time there. In the meantime, you could always just grab the last string of digits with a regular expression (in case the output is out of your control for some reason), but I reiterate, this is sloppy and the real answer is to output the correct format in the first place:
{REGEX(Replace|{TASK(PrevTask|StdOut)}|.*\s+(\d+)$|$1)}
The regular expression explained:
.* - match 0 or more any character
\s+ - followed by 1 or more whitespace characters
(\d+) - followed by a remembered group of 1 or more digits
$ - anchored to the end of the line
$1 is the replacement which is the first remembered group or in this example the string of digits at the end.