update udf example
add substring with date from tuple