jdoe Posted May 7, 2006 Share Posted May 7, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/9231-timetostr/ Share on other sites More sharing options...
wildteen88 Posted May 7, 2006 Share Posted May 7, 2006 The only way to convert a string into a timestamp (UNIX) is strtotime.MySQL supports UNIX timestamps. Quote Link to comment https://forums.phpfreaks.com/topic/9231-timetostr/#findComment-34033 Share on other sites More sharing options...
jdoe Posted May 7, 2006 Author Share Posted May 7, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/9231-timetostr/#findComment-34151 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.