Skip to content

Commit

Permalink
Update 05-Filters-excludes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
elliot-sawyer authored Sep 21, 2021
1 parent 4609399 commit 0f3aa51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/06-Advanced-Options/05-Filters-excludes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $query = new BaseQuery();

// Simple date filter - exclude any pages which have an embargo date in the future
$criteria = Criteria::where('SiteTree_Embargo')
->greaterThanEqual('NOW');
->greaterThanEqual(new \DateTime('NOW'));
$query->addExclude('embargo', $criteria);

// Starts with/ends with filter
Expand Down

0 comments on commit 0f3aa51

Please sign in to comment.