Ninjakreborn Posted October 17, 2007 Share Posted October 17, 2007 <?php $pdate = strptime($date, '%Y-%m-%d'); ?> this strptime function is not implemented on a windows system. Is there a function that can do the same as what the above does, but on a windows system? Quote Link to comment https://forums.phpfreaks.com/topic/73668-strptime-replacement/ Share on other sites More sharing options...
BlueSkyIS Posted October 17, 2007 Share Posted October 17, 2007 what does $date look like? was it generated with strftime? Quote Link to comment https://forums.phpfreaks.com/topic/73668-strptime-replacement/#findComment-371688 Share on other sites More sharing options...
Ninjakreborn Posted October 17, 2007 Author Share Posted October 17, 2007 Not, sure. It's a function that has it in there. I just know that when I run the page it tells me function does not exist. Quote Link to comment https://forums.phpfreaks.com/topic/73668-strptime-replacement/#findComment-371696 Share on other sites More sharing options...
Ninjakreborn Posted October 17, 2007 Author Share Posted October 17, 2007 It looks like each time the function is called,date is actually pulled directly from a database, which has it as a unix timestamp. Quote Link to comment https://forums.phpfreaks.com/topic/73668-strptime-replacement/#findComment-371711 Share on other sites More sharing options...
BlueSkyIS Posted October 17, 2007 Share Posted October 17, 2007 if we're sure it's a unix timestamp, we can use date(), but you'd need to match the formatting. much info: http://us3.php.net/date Quote Link to comment https://forums.phpfreaks.com/topic/73668-strptime-replacement/#findComment-371714 Share on other sites More sharing options...
darkfreaks Posted October 17, 2007 Share Posted October 17, 2007 try this function http://us3.php.net/manual/en/function.strtotime.php Quote Link to comment https://forums.phpfreaks.com/topic/73668-strptime-replacement/#findComment-371805 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.