Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate Date Value

I want to create a field that has the result of current date-scan date.

i.e; There is a field called Scan Date, which if doesn't fall within 21 days of current date, the result should be blocked, else unblocked. Tried different expressions but nothing is working.

7 Replies
Mark_Little
Luminary
Luminary

Hi,

I would add a flag in the load script.

Something like

IF(Today() - [Scan Date]) > 21, 0, 1) As showflag

then in your expressions you can just add {<showflag = {1}>}

Hope this helps

Mark

alexandros17
Partner - Champion III
Partner - Champion III

Try with

If(Num(Today()) - Num([Scan Date]) > 21,

0,

Num(Today()) - Num([Scan Date])

) As showflag

let me know

Not applicable
Author

Sure, I tried the ones that were mentioned earlier. Will try this and let u know. Thanks

Not applicable
Author

Can you give me the step by step how and where to do each step?

alexandros17
Partner - Champion III
Partner - Champion III

Open the expression and write the following:

If(Num(Today()) - Num([Scan Date]) > 21,

0,

Num(Today()) - Num([Scan Date])

)

Not applicable
Author

Thanks Alessandro. This works.

alexandros17
Partner - Champion III
Partner - Champion III

Could you please mark the answer? Thanks