Forum Discussion

DebLanser's avatar
DebLanser
Qrew Member
3 years ago

Duration field in Pipeline Outlook channel

Hi,
I am creating a pipeline using the Outlook channel to send an email.  I have a duration field {{a.days}} in the body of the email that is not coming through correctly.  A value of 2 days comes through as 172800000.  Any ideas on how to have it display correctly?

Thanks,
Deb

------------------------------
Deb Lanser
------------------------------

6 Replies

  • Do you want to come through as an integer number of days?  Or could there be fractional days or minutes and hours?

    If you have a duration which is really the time span between two date fields then you could make a numeric formula field in native QuickBase called  [# of Days]. The formula would be

    ToDays([my duration field])

    Then use that field in your email.

    That large value you are seeing is the number of milliseconds in two days.  60 * 60* 24 * 2 * 1000 = 172800000.





    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • DebLanser's avatar
      DebLanser
      Qrew Member
      Creating the formula field worked perfectly!  Thank you for your help!

      ------------------------------
      Deb Lanser
      ------------------------------
    • TateForgey's avatar
      TateForgey
      Qrew Assistant Captain
      Coach, did you give this advice because of any limitations in Pipelines with duration fields? Can I use them in calculations like I would in a formula duration field?

      I'm trying to create a Pipeline to track how long a record stays in a certain status and part of that is trying to set up a calculation using duration fields and insert that value into a field in an Update Record step. However, it threw this error:

      Validation error: {'time_in_received_status': ["field 'time_in_received_status' could not be coerced", 'must be of integer type']}

      I could have other mistakes in what I'm doing, but I just want to make sure I can create duration calculations here or if I need to create fields in the form to do that. 

      Thanks!

      ------------------------------
      Tate Forgey
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Ya, sorry, I don't really know how to work with Durations in Pipelines.


        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------