Sometimes the date string is empty

Sometimes the date string is empty,so I add the condition.