How to get date range from filtered data in cgridview?

Hi All,

I am using some fields in the _search for filtering the data.

User can choose between the following options to filter data:

  1. Date from: Date to:

  2. Month: Year:

  3. Quarter: Year:

  4. Fiscal Year:

I use these fields in the search method in the model to filter the data and then export the cgridview result in excel (using tlbExcelView). Eg: for the fiscal year:

if($this->year_g != null){









	$criteria->addCondition("t.dAnfang>=:from && t.dAnfang<=:to");

	$criteria->params += array('from' => date('Y-m-d', strtotime($date_from)),'to' => date('Y-m-d', strtotime($date_to)));


My problem is: How can I display in Excel the date range selected by user?

From the code above it is the $date_from and $date_to…

Thank you