Did you click the link I gave you? It has plenty of examples:
$rest = substr("abcdef", 1); // returns "bcdef"
$rest = substr("abcdef", 1, 3); // returns "bcd"
$rest = substr("abcdef", 0, 4); // returns "abcd"
$rest = substr("abcdef", 0, 8); // returns "abcdef"
I'm still not understanding what you want to do with the timestamp, but here's how to extract the year, month, and day into seperate variables using date_format
$query = mysql_query("SELECT DATE_FORMAT(column_name, '%Y') AS year, DATE_FORMAT(column_name, '%m') AS month, DATE_FORMAT(column_name, '%d') AS day FROM your_table");
while($row = mysql_fetch_array($query)) {
echo "Year: " . $row["year"] . "<br>";
echo "Month: " . $row["month"] . "<br>";
echo "Day: " . $row["day"] . "<br><br>";
}
Cgraz