Fixed auto detection of date granularity to trim the field.