I
I
ioioi2014-10-18 18:56:27
Yii
ioioi, 2014-10-18 18:56:27

Why does the string '2014.12.1' change to 12/01/2014 when writing to the database?

LAMP on the server. German locale on the client.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Gogolinsky, 2014-10-23
@gogolinsky

The cell in the database has the DATE type. MySQL stores the date in its own format. There is nothing to worry about here, just use the DATE_FORMAT() function when displaying the date from the database. With it, you can display the date in any format

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question