-2

I am looking to convert timestamp dates into readable formats, preferably YYYY-MM-DD, my current dates are in the following format:

1398898800000

Any assistance appreciated.

Many thanks Ben

Ben
  • 129
  • 3
  • 12

1 Answers1

3

The times look like they're coming from javascript, so you need to divide by 1000. So:

echo date('Y-m-d', 1398898800000 / 1000);

check out the date function.

Prisoner
  • 27,391
  • 11
  • 73
  • 102