Page 1 of 1

PHP timestamp

Posted: Sat Aug 23, 2014 3:13 am
by Com4dor
I need to convert "09.Feb.2014 - 05:27 pm" to a timestamp to get the days since. Is there Any way to do this?

Re: PHP timestamp

Posted: Sat Aug 23, 2014 3:15 am
by Sim
I believe what your looking for is the function "strtotime()"

Re: PHP timestamp

Posted: Fri Aug 29, 2014 5:44 pm
by Com4dor
I tried that it didn't work.

Re: PHP timestamp

Posted: Sat Aug 30, 2014 10:44 pm
by Jackolantern
You may have to do some string manipulation to get it in an acceptable format. That is kind of a strange format there for PHP datetimes.

Re: PHP timestamp

Posted: Sun Aug 31, 2014 12:17 am
by KyleMassacre
Take a look at this comment from the manual
http://php.net/manual/en/function.strtotime.php#100144