How do I format the date value in a conditional?