Convert NOW() into PHP timestamp

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
How do I convert a field entered into a Mysql database using NOW() into
a format that can be manipulated with PHP's strftime() function?

I'm pulling my hair out looking for a solution.  Thank you kindly.

Re: Convert NOW() into PHP timestamp

If your database column is a datetime type (probably is, since you used
NOW() to poplulate it), just select it as follows:

FROM myTable

Use the result (which will be the time represented in UNIX timestamp
format) as the second parameter to strftime().

Site Timeline