-2

Using this I can get the date and time difference.

$first_date = new DateTime(“2012-11-30 17:03:30”);
$second_date = new DateTime(“2012-12-21 00:00:00”);

$difference = $first_date->diff($second_date);

echo format_interval($difference);

How can i convert it from static to run as count-down timer?

Aishwarya Taneja
  • 140
  • 1
  • 12

1 Answers1

1

Try this jquery plugin

<script type="text/javascript" src="/path/to/jquery.countdown.js"></script>

<script type="text/javascript">
$(function() {
    $('.yourCountdownContainer').countdown({
        date: "June 7, 2087 15:03:26"
    });
});
</script>

Form more details enter link description here

Abhishek Sharma
  • 6,689
  • 1
  • 14
  • 20