date and time if clause