First things first:
Please ask your questions in english...this forum is an international effort, writing correct english as best as you can is not only polite but increases the chance of a helpful answer significantly - errors are normal and anticipated, but constructs as "CAn u plz" are frowned upon.

On to your problem:

Untested example to get you started:
[...] my $stmt = $dbh->prepare("insert into test1 values(FROM_UNIXTIME(?))") + or die("couldn't prepare insert: " . $@); $stmt->execute(time()-$old_time) or die ("couldn't perform insert: " . + $@); [...]
Consult The documentation available to repair my errors...

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus


In reply to Re: Timestamp problem by Tomte
in thread Timestamp problem by rashmi_k28

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":