Forum Discussion

DerekPipal1's avatar
DerekPipal1
Qrew Member
3 years ago

Formula Help

Hello,

I have two date fields called 1) Entry Date 2) Ship Date.  I want to create a numeric formula field that tells me how many days it took from the Entry Date to the Ship Date to track how long each order takes, any help would be great.

Thanks,
Derek

------------------------------
Derek Pipal
------------------------------
  • np,
    Try this as a formula numeric field type.

    var date ShipDateOrToday = IF(IsNull([Ship Date]), Today(), [ShipDate]);

    Todays($ShipDateOrToday - [Entry Date])

    // the formula above will have a running count of the days from the Entry date
    // until today up until the Ship date is populated.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • DerekPipal1's avatar
      DerekPipal1
      Qrew Member
      Perfect thank you Mark.

      ------------------------------
      Derek Pipal
      ------------------------------
    • DerekPipal1's avatar
      DerekPipal1
      Qrew Member
      I currently have this formula in a date field

      [Launch Date]-Days(Case([Distribution Type],"Digital Only",28,"Digital and Retail",62))

      But I also need to have a formula for when the "Platform" field is =NX to change the "Approval Date" field 80 days before the "Launch Date" field. Any idea how I would write that up?

      Thanks,

      Derek

      ------------------------------
      Derek Pipal
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        try this

        var number NumDays = IF(
        [Platform]  = "NX", 80,
        [Distribution Type]= "Digital Only", 28,
        [Distribution Type]= "Digital and Retail",62));

        [Launch Date]-Days($NumDays)






        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------