0

I am afraid, but i am unable to find any function for this? I can do this

echo date("Y-m-d g:i:s a",  1333442414662) . "\n";

but I am unable to find any function to convert time from function

date("Y-m-d H:i:s", time());

to unix timestamp

3
  • You mean you need to convert "09_05_2012_16_55_12" to a UNIX timestamp? Commented May 9, 2012 at 7:51
  • oops! sorry, i want to convert date("Y-m-d H:i:s", time()); Commented May 9, 2012 at 7:54
  • And what's the problem? What have you tried and what didn't work? Commented May 9, 2012 at 7:58

2 Answers 2

1

strtotime? http://php.net/manual/en/function.strtotime.php

Sign up to request clarification or add additional context in comments.

Comments

0

It's trivially easy as this:

$yourdate =date("Y-m-d H:i:s", time());

strtotime($yourdate);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.