Skip to main content

Non numerical result from TONOW()

  • August 14, 2017
  • 1 reply
  • 31 views

Hello,

Just a quick question.
TONOW({Shipping Date}) should return a number of days according to the reference, but I get “a month” instead of integer result. Also, the formatting options are greyed out with “not an integer or date” error.
How can I get an integer response?

Thanks in advance.

This topic has been closed for replies.

1 reply

Forum|alt.badge.img+5
  • Inspiring
  • August 14, 2017

I believe TONOW() returns a ‘friendly’ string – ‘a month,’ ‘12 days’ – rather than a numeric value. You probably want something along the lines of

DATETIME_DIFF({Shipping Date},NOW(),'d')

which will give you the number of days until (or since) {Shipping Date}. (I can never remember whether Date1 or Date2 should be later to avoid a negative result, so you may need to swap them about – or just wrap the whole thing with ABS().)