Used Groovy Sql's functions to convert parameters into the appropriate smallint and timestamp types