hi, i’m trying to do this thing but i can’t reach a result
I need to make a reminder appear to the user when an “expiration date” field is less than 30 days than today.
With ASP I did this
<% IF ((DateDiff("d",rst_scad_doc.Fields.Item("expiredate"),(now))>= -30) AND (DateDiff("d",rst_scad_doc.Fields.Item("expiredate"),(now)) <0)) THEN%> <span class="label label-warning" style="opacity: 1;">EXPIRING </span
I try to do in Wappler a similar thing.
I know it’s wrong because it does a string comparison on dates. But I don’t know where to start!
SELECT expiration
FROM pratica
WHERE DateDiff((d),(expiration),(:P1))>= -30
.Name: P1 Expression: date()