iolli
iolli

Reputation: 103

date entries in database

I am trying to change the date and time of an entry in my wordpress database.

The only thing I see is this number:

date: 1434533564

This number appears as 17.06.2015 at 09:32 on my webpage.

And here is the database structure:

`date` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,

How can I change time and date?

Thank you!

db date

Upvotes: 1

Views: 135

Answers (2)

redelschaap
redelschaap

Reputation: 2834

The date and time are stored as a timestamp. 1434533564 translates to 17 Jun 2015 09:32:44. You can easily change it in your website with PHP (strtotime('+1 day', 1434533564)) or with an online converter like http://www.onlineconversion.com/unix_time.htm

Upvotes: 1

Aman Aggarwal
Aman Aggarwal

Reputation: 18459

Actually its a unix timestamp.. You can use this function to see the actual date time :

select FROM_UNIXTIME(1434533564);

To change value you have to pass the date like this: UNIX_TIMESTAMP("2015-02-05 00:12:12") It will store the data in the format -> 1423116732

Upvotes: 1

Related Questions