Changed check for Date when formatting.