handle empty string for date formatted