Rule to compare with months ago #53
Answered
by
zeroSteiner
andre-picoli-ext-dock
asked this question in
Q&A
-
How can I compare the current date with 3 months ago using python rule_engine? Here's the code I'm trying to solve:
|
Beta Was this translation helpful? Give feedback.
Answered by
zeroSteiner
Feb 7, 2023
Replies: 1 comment 1 reply
-
You would use the TIMEDELTA data type that was added in v3.5. It doesn't support months exactly because months do not always have the same number of days. You can, however, check if the date is older than 90 days using Example:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zeroSteiner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You would use the TIMEDELTA data type that was added in v3.5. It doesn't support months exactly because months do not always have the same number of days. You can, however, check if the date is older than 90 days using
($today - t'P90D') > establishmentDate
.Example: