Check datetime field values before formatting.