Parse and format MySQL dates and times
