P
P
Pavel2016-09-20 09:40:25
MySQL
Pavel, 2016-09-20 09:40:25

How to change the field format?

You need to make an export from the old database and import it to the new site. The table has a field "year", which has the value of the year of manufacture. This is a four digit number. On the front on the current site, it is displayed like this, but in the database it is stored in this form:
6dfaff3820f14f71ba9d903c9f3e97c5.png
Bigint field format. How can I translate this number into human readable? I will do the export to CSV and then import it to another site.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2016-09-20
@Palych_tw

create a new column in the table with the date type, copy the values ​​into it in the required format as suggested by Maxim Fedorov , delete the old column, rename the new one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question