Discussions

Expand all | Collapse all

Countdown formula problem

  • 1.  Countdown formula problem

    Posted 04-18-2019 16:56
    I have a date field that will be some date in the future (field is titled "Publication Date") and I want QB to tell me how many days there are between that future date and today - a countdown. 

    I chose a duration formula field and input the following:
    ToDays([Publication Date]-Today()) 

    It isn't accepted saying "expecting duration but found number"

    What am I doing wrong??


  • 2.  RE: Countdown formula problem

    Posted 04-18-2019 17:12
    Hi Suzanne. If you change the field type for your countdown field to formula numeric, your formula should work. It will give you the number of days as a number rather than a duration.

    If you want to keep it as a formula duration, you can make the formula work by wrapping the whole thing in a Days() function:
    Days(ToDays([Publication Date]-Today()))
    Since the field needs to return a value of type duration, the Days() function will convert the numeric value returned by your current formula into a duration value.

    It's tricky, I know. It messes everybody up from time to time.

    Yours truly,

    Phillip


    PHILLIP DENNIS
    Principal | Watkyn LLC
    Quick Base Solution Provider
    (954) 900-6690 | hello@watkyn.com
    www.watkyn.com
    Watkyn LLC


  • 3.  RE: Countdown formula problem

    Posted 04-18-2019 17:18
    Amazing. Thank you!!