Record List based on current date

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
amsire2
User
Posts: 149

Record List based on current date

Post by amsire2 »

how to list a record based on current date only.


mobhar
User
Posts: 11905

Post by mobhar »

You may filter the recordset by using Recordset_Selecting server event.


amsire2
User
Posts: 149

Post by amsire2 »

I try this coding but nothing happen

// Row_Selecting event
function Row_Selecting(&$filter)
{
    // Enter your code here
AddFilter($filter, "TimeIn = CurrentDate()");
}

mobhar
User
Posts: 11905

Post by mobhar »

You put in Row_Selecting instead of Recordset Selecting server event.

In addition, you need to enclose the date value by the single quote characters.


amsire2
User
Posts: 149

Post by amsire2 »

I manage to filter the current date by using this code

// Recordset Selecting event
function Recordset_Selecting(&$filter)
{
    // Enter your code here
AddFilter($filter, "TimeIn = '".CurrentDate()."'");

}

Post Reply