Due date

Viewing 5 reply threads
  • Author
    Posts
  • January 25, 2023 at 11:33 AM #48790

    Glen Forister
    Participant

    Looks like I have to use Javascript to get a due date. How do you do this?

    Add a number of days to a calendar date to get a due date.

    January 25, 2023 at 4:53 PM #48791

    Daniel Leu
    Participant

    There is a DATEADD(Date;Y;M;W;D;H;M;S) function for calculations that might do the trick.

    Maybe something like DATEADD(TODAY(),0,0,0,30,0,0,0) and select Calculate one time only. This should create a date 30 days in the future.

    Documentation: https://www.tapforms.com/help-mac/5.3/en/topic/calculation

    • This reply was modified 1 year, 9 months ago by Daniel Leu.
    January 25, 2023 at 5:12 PM #48793

    Glen Forister
    Participant

    The due date is different for each record.
    2 fields are used here
    1 -Original date of event.
    2 – days until next thing is due.
    It doesn’t look like you can use a field in the option “D”.
    DATEADD(Date;Y;M;W;D;H;M;S)

    Looks like D has to be a set number, not a var from another field. That is why I thought a script would be needed.

    January 25, 2023 at 6:08 PM #48794

    Daniel Leu
    Participant

    Hmmm… this works for me DATEADD([Date];0;0;0;[Number];0;0;0). [Number] has the type number; it even works as a text type.

    January 26, 2023 at 9:56 AM #48795

    Glen Forister
    Participant

    Ok, using zeros in there made it work. I guess zero is adding nothing, not replacing with zero.

    I missed that trick while getting it to work. Also, the example seemed explicit to real data not variables.
    Thanks – would not have gotten there without help.

    January 26, 2023 at 7:16 PM #48796

    Brendan
    Keymaster

    That’s right a 0 means add nothing for that specific calendar unit. All parameters are required.

Viewing 5 reply threads

You must be logged in to reply to this topic.