How do yo convert this 2014-11-03 17:01:37 into Unix Timestamp? Is there a method that I can use.
Asked
Active
Viewed 65 times
-1
-
[`strptime`](http://www.php.net/manual/en/function.strptime.php) – Salman A Nov 05 '14 at 10:07
4 Answers
0
use - strtotime()
$date = "2014-11-03 17:01:37";
echo strtotime($date);

Sougata Bose
- 31,517
- 8
- 49
- 87
0
You can create a DateTime
object:
$time = new DateTime("2014-11-03 17:01:37");
$time->getTimestamp();

Naruto
- 1,210
- 3
- 25
- 28
0
PHP has a function strtotime
for that purpose.
echo strtotime("2014-11-03 17:01:37");

Basit
- 1,830
- 2
- 31
- 50