The pipe | is used to pass output from first command as an input to the another command, so:
test.sh | date "+TEMPLATE_%Y%m%d"
means that shell will execute the test.sh command and then will pass the stdout of test.sh as an stdin for date command. If you want to pass arguments, don't use pipe and do it as mi294r3 wrote.