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! 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. 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! Link to comment https://forums.phpfreaks.com/topic/9231-timetostr/#findComment-34151 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.