c_shelswell Posted February 5, 2007 Share Posted February 5, 2007 I've been given a database where they've decided to put the date of birth as a timestamp. They've delt with dates prior to 1970 by using negative numbers. I'm trying to convert them back to real dates is there and easy way of converting the negative numbers back? Cheers Link to comment https://forums.phpfreaks.com/topic/37135-negative-timestamps-converting-to-date/ Share on other sites More sharing options...
richardw Posted February 5, 2007 Share Posted February 5, 2007 Try using substr, this works for me $daystring = $row["birthdate"]; $month = substr($daystring, 4, 2); $day = substr($daystring, 6, 2); $year = substr($daystring, 0, 4); Best, Link to comment https://forums.phpfreaks.com/topic/37135-negative-timestamps-converting-to-date/#findComment-177359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.