Forum

Thread tagged as: Question, Problem, Comments

Filtering comments by date

Hello,

I need to filter job list by date. So basically, old job list will be removed automatically when it is dated before the current date. I tried the if statement but it is not working at the moment. I am using the comments app.

Thanks!

Vaneza Mae Aumento

Vaneza Mae Aumento 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You need a filter:

'filter' => 'commentDateTime',
'match' => 'lt',
'value' => date('Y-m-d H:i:00'),

That's it! I was trying to find these on the documentation for comments. Thanks ever so much Drew!