Skip to main content
January 2, 2023
Question

Validations between two dates

  • January 2, 2023
  • 2 replies
  • 0 views

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

    2 replies

    harshitb6843
    January 2, 2023

    Just wrap your local!endDate and local!startDate in toDate() function and it should work. 

    January 2, 2023

    Thank you it sorted by issue