Fix conversion from string to date