make invoice date more robust