# Change Countdown Clock date \[renamed\]

**URL:** https://forum.kirupa.com/t/change-countdown-clock-date-renamed/277320
**Category:** flash
**Created:** [December 10, 2008, 7:49pm UTC](https://forum.kirupa.com/t/change-countdown-clock-date-renamed/277320 "2008-12-10T19:49:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RoboSheila](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@RoboSheila](https://forum.kirupa.com/u/RoboSheila)
#### Post date: [December 10, 2008, 7:49pm UTC](https://forum.kirupa.com/t/change-countdown-clock-date-renamed/277320/1 "2008-12-10T19:49:38Z")

</div>

Hello there,

I was able to figure out how to change the Countdown Clock date but I seem to be falling in a jam and hope someone can help me. On the Action Script countdown clock I would like to change the time (hrs, ex: date is set to 12/19/08 but the time needs to be 8pm). Can someone please tell me how to change the time?

Below is my action script

Thanks in advance!

this.onEnterFrame = function() {  
var todayDate = new Date();  
var currentYear = today.getFullYear();  
var currentTime = today.getTime();  
var targetDateDate = new Date (currentYear,11,19);  
var targetTime = targetDate.getTime();  
var timeLeft = targetTime - currentTime;  
var sec = Math.floor (timeLeft/1000);  
var min = Math.floor (sec/60);  
var hrs = Math.floor(min/60);  
var days = Math.floor(hrs/24);  
sec = string (sec % 60);  
if (sec.length \< 2){  
sec = “0” + sec;

}  
min = string(min % 60);  
if (min.length \< 2){  
min = “0” + min;

}

hrs = string(hrs % 24);  
if (hrs.length \< 2){  
hrs = “0” + hrs;

}  
days = string(days);

var counter:String = days + “:” + hrs + “:” + min + “:” + sec;  
time\_txt.text=counter;

}
