replace undefined in format with dash