jenniferG Posted July 31, 2007 Share Posted July 31, 2007 we have a mysql database where one of the tables has timestamp column and thr column has in it 20070728112313'. We have tried all we know of, strftime,date, and getdate, to retrieve the dater and they all return month=07 day =28 year = 2038 where they should be:- month=07 day = 28 year = 2007 Thanks, Jernnifer Quote Link to comment https://forums.phpfreaks.com/topic/62667-date-format/ Share on other sites More sharing options...
mrjcfreak Posted July 31, 2007 Share Posted July 31, 2007 If the unformatted date is $sqldate, this will return unix timestamp: mktime( substr($sqldate,8,9),substr($sqldate,10,11),substr($sqldate,12),substr($sqldate,4,5),substr($sqldate,6,7),substr($sqldate,0,4), ) Quote Link to comment https://forums.phpfreaks.com/topic/62667-date-format/#findComment-311894 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.