Validations between two dates

Hi,

I have a start date and end date and the CDT type for the two fields are text. Now I need a validation that the end date should not be earlier to start date

I have given one condition as 

validations: if(local!endDate<=local!startDate,"End date should not be earlier than the start date",""), it is working fine if the dates are in the same year. But if I am giving the start date as today and the end date as previous year it is not working. can anyone help me with this

  Discussion posts and replies are publicly visible