Date Calculations

Comments

8 comments

  • Rainer Grabowski

    Hi Ryan,

    var date = @Quote Submitted;
    date != null ? moment(date).add(7,'d').toDate() : ""

    Maybe an error notification shown in the preview. Ignore it, save the template. 

    Rainer

    1
    Comment actions Permalink
  • Ryan Goodale

    Thanks for the reply Rainer.......Here are the two errors I came up with - it wouldn't actually allow me to save it - so I'm assuming it's just something small I've done.

    Any thoughts on what I've done or, more accurately, what I need to do?

     

    0
    Comment actions Permalink
  • Rainer Grabowski

    You need to pick a token from the token list which opens as a dropdown when you enter @ followed by a field name. @Quote Submitted must be blue (becoomes bue after picking it from the list). Please read this introduction: 
    https://help.podio.com/hc/en-us/articles/201019358-Calculations

    And why do you add "AP Required" inbetween the brackets in .toDate()? Remove it. 

    Rainer

    0
    Comment actions Permalink
  • Ryan Goodale

    Thanks - the issue was that I simply copy/pasted your text in - I had to delete, and then add, @Quote Submitted for it to work.  Thanks very much for your help

     

    Ryan

    0
    Comment actions Permalink
  • Tara

    I have a similar question:

    Let's say I have a field @Last Contacted Date and I want the difference from that and today's date to prioritize my client follow ups. How do I calculate that? I'm a newbie and dont know Momentum or Javascript. Anyone can help?

    0
    Comment actions Permalink
  • Rainer Grabowski

    Hi Tara, 

    calculating the difference between a date in a date field and "Today" needs a workaround. Please read my comment here:
    https://help.podio.com/hc/en-us/community/posts/115000113951-Trying-return-a-number-on-subtracting-today-s-date-from-a-given-date-in-a-field-?page=1#community_comment_115000105451

    Rainer

    0
    Comment actions Permalink
  • Chris North

    How do modify this to remove the time stamp? This works great, but I prefer just to have the date...

    0
    Comment actions Permalink
  • Rainer Grabowski

    Hi Chris,

    in the calculation field change the field settings: Click the little triangle at the left side of the calculation field brick and deselect "show time" (time will be still shown in the preview but not in the item view).

    Rainer

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk