Jump to content

Archived

This topic is now archived and is closed to further replies.

jdoe

"timetostr"..?

Recommended Posts

While I've easily found a number of manners to convert a timestamp to a formatted date, I'm having the hardest time trying to find a way to convert a formatted date into a timestamp!

I know there's got to be a way to "timetostr" as it were, converting a, for example, date(d F Y H:i:s O) formatted date into a MySQL-style timestamp, but I've driven myself to headache and still haven't found it.

Any help, a function that'll accomplish this, would be much, [b][i]much[/i][/b] obliged!

Share this post


Link to post
Share on other sites
The only way to convert a string into a timestamp (UNIX) is strtotime.

MySQL supports UNIX timestamps.

Share this post


Link to post
Share on other sites
God! I had the whole thing backward; it [b][i]is[/i][/b] just plain ol' strtotime()! [i]Idiot![/i]

Thanks [b][i]very[/i][/b] much, I've got it now!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.