Closed evskorobogatij closed 4 years ago
What can i do to output DateTime (timestampz) to datatable column?
Thank youОтправлено со смартфона Samsung Galaxy. -------- Исходное сообщение --------От: Artisoy Fernandez notifications@github.com Дата: 23.06.20 17:13 (GMT+03:00) Кому: omines/datatables-bundle datatables-bundle@noreply.github.com Копия: evskorobogatij evskorobogatij@gmail.com, Author author@noreply.github.com Тема: Re: [omines/datatables-bundle] DateTime no output in table (#158) Use "createdAt" instead of "created_at". ->add("createdAt",DateTimeColumn::class,[ 'format' => 'd-m-Y', ])
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/omines/datatables-bundle/issues/158#issuecomment-648177502", "url": "https://github.com/omines/datatables-bundle/issues/158#issuecomment-648177502", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
This issue can only mean there is a NULL
value in your database, and your render
function does not check for that.
I would recommend following the very very bad documentation at https://omines.github.io/datatables-bundle/#datetimecolumn and use the format
and nullValue
options to fix this issue.
I have entity Petition:
Then I try output data in table
But no data in created_at columns/ I change:
But error occured `Uncaught Error: Call to a member function format() on null. Why data is null? It present in database table
P.S. Type of created_at is timestamp with timezone