Changes to handle date interval functions for MySQL