I have this value from database:
\'2009-1-1 00:00:00\', okay, let me paste my code:
$fetch = mysql_fetch_assoc($result); $db_value = $fetch[\'date\']
You should use the second one, because your db result is a string so it can't be used like that.