mysql udf functions for using and manipulating renewal date strings