Hi
I have the below line
$accounts = $accountsBean->get_full_list('', "accounts.date_entered > SUBDATE(NOW(),2)");
It should return data of date 10-09-2016 but it is not returning
There are 2 records of this date
Thanks
Hi
I have the below line
$accounts = $accountsBean->get_full_list('', "accounts.date_entered > SUBDATE(NOW(),2)");
It should return data of date 10-09-2016 but it is not returning
There are 2 records of this date
Thanks
Hi Jagjit Singh,
$accounts = $accountsBean->get_full_list('', "accounts.date_entered > SUBDATE(NOW(),2)");
It should return data of date 10-09-2016 but it is not returning
There are 2 records of this date
Including date & time issue.
You are seeking 10-9-2016 record but now() return data & time if it's return 10-9-2016 12:10:12 after that date & time greater than record display.
You can use DATE_FORMAT for particular date record display.
Dipesh
Hi
Can u pls help me how to use date_format.
Thanks
Hi,
You can try this
$accounts = $accountsBean->get_full_list('', "DATE_FORMAT(accounts.date_entered, '%Y-%m-%d') >= DATE_FORMAT(SUBDATE(NOW(),2), '%Y-%m-%d')");
Hi,
You can try this
$accounts = $accountsBean->get_full_list('', "DATE_FORMAT(accounts.date_entered, '%Y-%m-%d') >= DATE_FORMAT(SUBDATE(NOW(),2), '%Y-%m-%d')");
Hi OffShore
One question i want in below line that instead of yesterday Date should come
Please find details of Accounts Created yesterday.
Thanks
Hi,
Please try below
$accounts = $accountsBean->get_full_list('', "DATE_FORMAT(accounts.date_entered, '%Y-%m-%d') = DATE_FORMAT(SUBDATE(NOW(),1), '%Y-%m-%d')");