(https://cdn.koolreport.com/assets/images/editor/c4/image5ecf7d08c8909.png)
Timestamp format not working.
"2017-03-06 10:19:25.684244" "2017-03-06 10:19:25.684244" "2017-03-06 10:19:25.684244"
This format Timestamp not working.
protected function setup()
{
$this->src('sakila_rental')
->query("SELECT write_date,code FROM account_account")
/*->pipe(new ColumnMeta(array(
"write_date"=>array(
"type"=>"datetime",
"format"=>"Y-m-d H:i:s.u"
)
)))
->pipe(new TimeBucket(array(
"write_date"=>"quarter"
)))*/
->pipe(new Custom(function($data){
$data["write_date"] = $data["write_date"]->format("Y-m-d H:i:s");
return $data;
})) ->pipe(new ColumnMeta(array(
"write_date"=>array(
"type"=>"datetime",
"format"=>"Y-m-d H:i:s"
)
)))
->pipe(new Group(array(
"by"=>"write_date",
"sum"=>"code"
)))
->pipe($this->dataStore('sale_by_month'));
}
I,m trying this code not working.