Skip to main content

Compare date fields values

Would it be possible to have the ability to compare two date fields values in validation rules.

ie: valid id date 2 after or date 1

Thanks,

Pierre

Status: Completed3 comments

Log in to comment and vote

Comments3

  • Julien

    Team•

    Oct 30

    Hi Pierre! This is now implemented and available in OpnForm.

    To require date 2 to be on or after date 1, open Date 2 → Validation → Add rule, choose Date 2 → On Or After, switch Fixed date to Field or variable, and select Date 1. Add your error message and save the form.

    Computed variables work too: create a variable under Settings → Variables that returns a date (for example, {Date 1}), then choose that variable in the same Field or variable selector. You can also create a reusable Dates valid variable and require it to equal 1 in validation; the product update includes a complete date-only formula and setup steps.

    Both referenced fields must use the same time setting. Empty dates do not pass unless you explicitly allow them with an Is empty OR… rule.

    Full walkthrough and variable formula: Read the product update

  • Open Research Calendar

    •

    Oct 29

    Hi @Archie, I would really love to see this feature! We currently have a form that adds events to a calendar (using make.com); However, if the user accidentally submits an ‘end’ date that occurs before the ‘start’ date, it completely breaks our automation!

  • Archie

    Team•

    Jun 4

    Hi Pierre,

    Thanks for the suggestion!

    At the moment, comparing the values of two date fields within validation rules isn't supported yet. However, this is a great use case, and we can definitely see how validations such as "Date 2 must be after Date 1" would be useful.

    I've noted your feedback and will share it with our Product team for consideration in future improvements.

    Thanks for taking the time to suggest it!