0

how can i convert 2016/02/12 09:00 PM format date and time to Unix timestamp.Thanks in advance

RoSe
  • 447
  • 4
  • 7
  • 20
  • 1
    try this `$d = DateTime::createFromFormat('Y/m/d h:i A', '2016/02/12 09:00 PM',new DateTimeZone('UTC')); echo $d->getTimestamp();` – Juice Feb 12 '16 at 03:57

1 Answers1

0

Have You Tried the strtotime() function.

Take a look in detail here: http://php.net/manual/en/function.strtotime.php

The Beast
  • 1
  • 1
  • 2
  • 24