Skip to main content
Question

Filtering Date based on @DateTimeNow()

  • July 19, 2025
  • 1 reply
  • 23 views

galigis
Enthusiast
Forum|alt.badge.img+20

Hi All,

I have tried to implement several suggestions from the community regarding date filtering; however, I have not been successful so far. I am trying to filter dates in a CSV file based on the "last login" within the past three months. The date format in the file is as follows:

  • 18/07/2025 09:16
  • 08/07/2025 12:46
  • 01/02/2024 10:07
  • 16/01/2025 10:33

I have converted those dates to %Y%m%d resulting ‘20230403’ then add an AttributeManager to change the ‘last_loging’ attribute to ‘date’ and finally used the following expression to filter the "last login" within the past three months:

@Evaluate(@DateTimeFormat(@DateTimeSubtract(@DateTimeNow(), '3', 'months'), '%Y%m%d'))

...but for some reason doesn’t work,

Any guidance or support would be greatly appreciated.

1 reply

galigis
Enthusiast
Forum|alt.badge.img+20
  • Author
  • Enthusiast
  • July 20, 2025

I think I have found the correct expression :)

@DateTimeAdd(@DateTimeNow(),-P3M)

Thanks


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings