Help

DateTime_Diff formula with three different possibilities

Topic Labels: Formulas
Solved
Jump to Solution
1616 4
cancel
Showing results for 
Search instead for 
Did you mean: 
TVR80
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello-

I’d like to create a formula that allows me to track expiration dates status (three possibilities):

  1. Due soon, but not within four weeks (blank value in table);
  2. Due within four weeks (“Yes”);
  3. Past due (“Late”)

I’ve been able to create this with the first two status items, but not the third (“Late”). Here’s what I have:

IF(
AND(
DATETIME_DIFF({Expiration}, NOW(), “days”) < 28,
DATETIME_DIFF({Expiration}, NOW(), “days”) > 0
), “Yes”
)

Thanks!

1 Solution

Accepted Solutions

agh it has :face_with_symbols_over_mouth: smart quotes in it. you need to retype all the quotes. see if this works, if not just literally delete the quotes and retype them.

IF(AND(DATETIME_DIFF({Expiration}, NOW(),‘days’)<28,
DATETIME_DIFF({Expiration}, NOW(), ‘days’)>0),‘YES’, IF(DATETIME_DIFF({Expiration},NOW(),‘days’)<0,‘LATE’))

See Solution in Thread

4 Replies 4

you need something that says like

IF(AND(

DATETIME_DIFF({Expiration}, NOW(),‘days’)<28,

DATETIME_DIFF({Expiration}, NOW(), ‘days’)>0),‘YES’, IF(DATETIME_DIFF({Expiration},NOW(),‘days’)<0,‘LATE’))

Hmm. This is giving me an error, but I’ll see if I can tweak it. Thank you!!

agh it has :face_with_symbols_over_mouth: smart quotes in it. you need to retype all the quotes. see if this works, if not just literally delete the quotes and retype them.

IF(AND(DATETIME_DIFF({Expiration}, NOW(),‘days’)<28,
DATETIME_DIFF({Expiration}, NOW(), ‘days’)>0),‘YES’, IF(DATETIME_DIFF({Expiration},NOW(),‘days’)<0,‘LATE’))

Worked like a charm. Thank you thank you thank you.