Hi All,
I am using some fields in the _search for filtering the data.
User can choose between the following options to filter data:
-
Date from: Date to:
-
Month: Year:
-
Quarter: Year:
-
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){
$start_;
$end_;
$start_month='10';
$end_month='9';
$year=$this->year_g;
$next_year=$year+1;
$date_from=$year.'-'.$start_month.'-'.$start_date;
$date_to=$next_year.'-'.$end_month.'-'.$end_date;
$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