Fix SQL dates, fixes #92