Hi All
I am looking to only display results created today in a connection
I thought something like this would work . . but no!
Any have any ideas on how to add todays date as a condition? I am guessing i would also have to have %today()% or something.
Thanks
I am looking to only display results created today in a connection
I thought something like this would work . . but no!
<?php
$form->data['current-date'] = date('Y-m-d');
?>
<?php
return array("created" LIKE => $form->data("current-date"));
?>
Any have any ideas on how to add todays date as a condition? I am guessing i would also have to have %today()% or something.
Thanks
Hi darrenhallinan,
A few typos to be fixed. And what do you want the condition to be - just to select those with today's date? Please try this
Note that you may have problems with local time zone settings that heed to be fixed.
Bob
A few typos to be fixed. And what do you want the condition to be - just to select those with today's date? Please try this
<?php
$today = date('Y-m-d');
return array( 'created LIKE' => '%'.$today.'%' );
?>
Note that you may have problems with local time zone settings that heed to be fixed.
Bob
As always cheers bob
This topic is locked and no more replies can be posted.