Page 1 of 1

Record List based on current date

Posted: Thu Aug 01, 2024 2:11 pm
by amsire2

how to list a record based on current date only.


Re: Record List based on current date

Posted: Thu Aug 01, 2024 2:49 pm
by mobhar

You may filter the recordset by using Recordset_Selecting server event.


Re: Record List based on current date

Posted: Thu Aug 01, 2024 10:51 pm
by amsire2

I try this coding but nothing happen

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

Re: Record List based on current date

Posted: Thu Aug 01, 2024 10:55 pm
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.


Re: Record List based on current date

Posted: Thu Aug 01, 2024 11:54 pm
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()."'");

}