H
H
HeartOfProgrammer2016-06-06 21:56:17
Laravel
HeartOfProgrammer, 2016-06-06 21:56:17

Why does the database output the date and time even though the sql data type is DATE?

I am using laravel 5.1. I display the publication date of the news like this:

<a href="#" class="news-footer_date date-news">{{ $news->created_at }}</a>

The field type "created_at" is "date"
According to the idea, it should only display the publication date, but for me it displays the publication date and time.
1ed0adbb6b5e4f6fa9992a02492ec187.png
Outputs in this format 2016-06-07 00:00:00

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tesla, 2016-06-06
@Tesla

Because it's time to stop asking questions that are answered in the documentation . Seriously, this whole doc can be read in a couple of hours.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question