CAn u plz guide a solution.
I want to convert unix_timestamp into timestamp format which is readable.
the value should be inserted into database mysql which is the timestamp datatype.
I am not able to insert into database if i convert unix_timestamp to localtime(). the inserted value got as NULL
$query = "select unix_timestamp(now())- unix_timestamp(timestamp) from
+ test;
$query1= $dbh->prepare($query);
$query1->execute();
while(@row_time = $query1->fetchrow_array()){
$old_time=$row_time[0];
}
$tt= localtime($old_time);
$quer= $dbh->do("insert into test1 values(" . $tt .")");
print "$quer";
$dbh->disconnect;
exit(0);