Skip to main content

Hi, 

I wanted to very simply use a tester to select all records that had a date in the past week. I have tried everything but it does not seem to work.

I have a date field in the correct format, I have also tried other formats via the date/time converter but it does not work. 

@DateTimeNow()-7 does not work.

Anyone have any other suggestions? 

Thx

Nathalie

The code below will give you 7 days prior to the current date.

@DateTimeAdd(@DateTimeNow(),-P7D)

 


Unfortunately it doesn't work. Am I doing something wrong?

 

 


Unfortunately it doesn't work. Am I doing something wrong?

 

 

 

DateTimeNow returns a value as %Y%m%d%H%M%S, for example 20170203170000.1234567

If your Wijzigingsdatum is formatted as %Y%m%d then you have to reformat one or the other.

 

@Left(@DateTimeAdd(@DateTimeNow(),-P7D),8)

Will return 20240223 for today.


That works! thank you very much!

 


Reply