Comparing date fields from a referenced item on a different app
Hi everyone, I am trying to compare the oldest start date that I just grabbed from another app related to the item on the app where I have the fields formatted to the one shown below.  It seems that the results I wanted to get are not really correct.  The result I am mostly getting is the value on "Start Date with A".  Can you help me with this?  Thanks in advance. Start Date with A (calculation field) = moment(@All of Start Date with A.join()).format("YYYY-MM-DD") Start Date with B (calculation field) = moment(@All of Start Date with B.join()).format("YYYY-MM-DD") Start Date with C (calculation field) = moment(@All of Start Date with C.join()).format("YYYY-MM-DD") Oldest Start Date (calculation field) =  if((@Start Date with A < @Start Date with B) || (@Start Date with A < @Start Date with C)){@Start Date with A;} else if((@Start Date with B < @Start Date with A) || (@Start Date with B < @Start Date with C)){@Start Date with B;} else {@Start Date with C;}

  • Hi Steve, you can try this: var a = moment(@All of Start Date with A.join()).format("YYYY-MM-DD");var b = moment(@All of Start Date with B.join()).format("YYYY-MM-DD");var c = moment(@All of Start Date with C.join()).format("YYYY-MM-DD");[a,b,c].sort()[0] If you want the youngest date: [a,b,c].sort().reverse()[0] Rainer
This question is closed.