0

i'm currently looking at something and it says this. "last_updated":1471323637

how can i convert that number into a time that I can actually read because at the moment i have no idea what time/date that is.

thank you.

Viole
  • 67
  • 1
  • 1
  • 5

2 Answers2

1

Use FROM_UNIXTIME if you want to convert it to human readable time in MySQL

SELECT FROM_UNIXTIME(1471323637);

And you will get an output like below:

2016-08-16 11:00:37
1000111
  • 13,169
  • 2
  • 28
  • 37
1

Try this

echo date('H:i:s d/m/y' ,1471323637);

Output

10:30:37 16/08/16

for more info about date please read http://php.net/manual/en/function.date.php

You can also try this

echo date("g:i a, j M Y" ,1471323637);

Output

 10:30 am, 16 Aug 2016
Passionate Coder
  • 7,154
  • 2
  • 19
  • 44