Countdown formula problem

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • Answered
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??
Photo of Suzanne Schaefer

Suzanne Schaefer

  • 150 Points 100 badge 2x thumb

Posted 4 months ago

  • 0
  • 1
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
Photo of Suzanne Schaefer

Suzanne Schaefer

  • 150 Points 100 badge 2x thumb
Amazing. Thank you!!