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 58 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
- 30,871
- 8
- 44
- 87
0
You can create a DateTime object:
$time = new DateTime("2014-11-03 17:01:37");
$time->getTimestamp();
Naruto
- 1,212
- 3
- 25
- 26
0
PHP has a function strtotime for that purpose.
echo strtotime("2014-11-03 17:01:37");
Basit
- 1,750
- 2
- 27
- 50