Fixed broken date format handling, closes #910