• Resolved jhnpldng

    (@jhnpldng)


    Hello, I’m trying to select a date in the future, input a number of days to count back from that and return the resulting date. Can you help?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author CodePeople2

    (@codepeople2)

    Hello @jhnpldng

    Thank you very much for using our plugin.

    Assuming the date field is the fieldname1, and the number field the fieldname2, you can edit the equation as follows:

    CDATE(fieldname1-fieldname2, 'dd/mm/yyyy');

    You can enter any other email format as the second CDATE parameter.

    Best regards.

    Thread Starter jhnpldng

    (@jhnpldng)

    Thanks for the fast reply.

    The goal; enter a date, enter number(of days) get new date returned with number of days subtracted

    It’s subtracting months instead of days. Entering a date of 05/05/2025 and number of 2 returns 03/05/2025. Number of 1 returns 04/05/2025

    Date Field is fieldname3
    Number Field is fieldname2
    Calculated Field is fieldname1

    CDATE(fieldname3-fieldname2, 'dd/mm/yyyy');

    Results based on number entered
    1 = 04/05/2025
    2 = 03/05/2025
    3 = 02/05/2025
    4 = 01/05/2025
    5 = 30/04/2025
    6 = 29/04/2025
    7 = 28/04/2025

    • This reply was modified 2 months, 2 weeks ago by jhnpldng. Reason: adding more info
    Plugin Author CodePeople2

    (@codepeople2)

    Hello @jhnpldng

    The result is correct, but you want the output in the mm/dd/yyyy format instead of dd/mm/yyyy. So, you need only to modify the second parameter in the CDATE operation:

    CDATE(fieldname3-fieldname2, 'mm/dd/yyyy');

    Best regards.

    Thread Starter jhnpldng

    (@jhnpldng)

    That fixed it. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.